https://github.com/git/git

sort by:
Revision Author Date Message Commit Date
874dd41 Git 2.22-rc2 Signed-off-by: Junio C Hamano <gitster@pobox.com> 30 May 2019, 17:56:29 UTC
8feb8e2 Merge branch 'js/rebase-config-bitfix' * js/rebase-config-bitfix: rebase: replace incorrect logical negation by correct bitwise one 30 May 2019, 17:50:47 UTC
c41b119 Merge branch 'es/doc-gitsubmodules-markup' Doc markup fix. * es/doc-gitsubmodules-markup: gitsubmodules: align html and nroff lists 30 May 2019, 17:50:46 UTC
936dce6 Merge branch 'ja/diff-opt-typofix' Typofix. * ja/diff-opt-typofix: diff: fix mistake in translatable strings 30 May 2019, 17:50:46 UTC
0e5387c Merge branch 'jt/clone-server-option' A brown-paper-bag bugfix to a change already in 'master'. * jt/clone-server-option: fetch-pack: send server options after command 30 May 2019, 17:50:46 UTC
fa03d9c Merge branch 'sg/progress-off-by-one-fix' A brown-paper-bag bugfix to a change already in 'master'. * sg/progress-off-by-one-fix: progress: avoid empty line when breaking the progress line 30 May 2019, 17:50:45 UTC
2656ece Merge branch 'js/rebase-deprecate-preserve-merges' A bit more leftover clean-up to deprepcate "rebase -p". * js/rebase-deprecate-preserve-merges: rebase docs: recommend `-r` over `-p` docs: say that `--rebase=preserve` is deprecated tests: mark a couple more test cases as requiring `rebase -p` 30 May 2019, 17:50:45 UTC
463dca6 Merge branch 'sg/trace2-rename' Rename environment variables that are used to control the "trace2" mechanism to a more readable name. * sg/trace2-rename: trace2: document the supported values of GIT_TRACE2* env variables trace2: rename environment variables to GIT_TRACE2* 30 May 2019, 17:50:45 UTC
90f2d88 Merge branch 'jh/trace2' * jh/trace2: trace2: fix tracing when NO_PTHREADS is defined 30 May 2019, 17:50:45 UTC
20aa7c5 Merge branch 'nd/diff-parseopt' A brown-paper-bag bugfix to a change already in 'master'. * nd/diff-parseopt: parse-options: check empty value in OPT_INTEGER and OPT_ABBREV diff-parseopt: restore -U (no argument) behavior diff-parseopt: correct variable types that are used by parseopt 30 May 2019, 17:50:44 UTC
f7e68a0 parse-options: check empty value in OPT_INTEGER and OPT_ABBREV When parsing the argument for OPT_INTEGER and OPT_ABBREV, we check if we can parse the entire argument to a number with "if (*s)". There is one missing check: if "arg" is empty to begin with, we fail to notice. This could happen with long option by writing like git diff --inter-hunk-context= blah blah Before 16ed6c97cc (diff-parseopt: convert --inter-hunk-context, 2019-03-24), --inter-hunk-context is handled by a custom parser opt_arg() and does detect this correctly. This restores the bahvior for --inter-hunk-context and make sure all other integer options are handled the same (sane) way. For OPT_ABBREV this is new behavior. But it makes it consistent with the rest. PS. OPT_MAGNITUDE has similar code but git_parse_ulong() does detect empty "arg". So it's good to go. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 May 2019, 18:04:33 UTC
8ef0519 diff-parseopt: restore -U (no argument) behavior Before d473e2e0e8 (diff.c: convert -U|--unified, 2019-01-27), -U and --unified are implemented with a custom parser opt_arg() in diff.c. I didn't check this code carefully and not realize that it's the equivalent of PARSE_OPT_NONEG | PARSE_OPT_OPTARG. In other words, if -U is specified without any argument, the option should be accepted, and the default value should be used. Without PARSE_OPT_OPTARG, parse_options() will reject this case and cause a regression. Reported-by: Bryan Turner <bturner@atlassian.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 May 2019, 18:04:32 UTC
7f125ff diff-parseopt: correct variable types that are used by parseopt Most number-related OPT_ macros store the value in an 'int' variable. Many of the variables in 'struct diff_options' have a different type, but during the conversion to using parse_options() I failed to notice and correct. The problem was reported on s360x which is a big-endian architechture. The variable to store '-w' option in this case is xdl_opts, 'long' type, 8 bytes. But since parse_options() assumes 'int' (4 bytes), it will store bits in the wrong part of xdl_opts. The problem was found on little-endian platforms because parse_options() will accidentally store at the right part of xdl_opts. There aren't much to say about the type change (except that 'int' for xdl_opts should still be big enough, since Windows' long is the same size as 'int' and nobody has complained so far). Some safety checks may be implemented in the future to prevent class of bugs. Reported-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 29 May 2019, 18:04:30 UTC
7948b49 rebase docs: recommend `-r` over `-p` The `--preserve-merges` option is now deprecated in favor of `--rebase-merges`; Let's stop recommending the former. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 20:22:35 UTC
7401ab9 docs: say that `--rebase=preserve` is deprecated As of Git v2.22.0, the `--preserve-merges` backend of `git rebase` will be officially deprecated in favor of the `--rebase-merges` backend. Consequently, `git pull --rebase=preserve` will also be deprected. State this explicitly. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 20:22:34 UTC
db4a3f2 tests: mark a couple more test cases as requiring `rebase -p` The `--preserve-merges` option has been deprecated, and as a consequence we started to mark test cases that require that option to be supported, in preparation for removing that support eventually. Since we marked those test cases, a couple more crept into the test suite, and with this patch, we mark them, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 20:22:32 UTC
5b204b7 fetch-pack: send server options after command Currently, if any server options are specified during a protocol v2 fetch, server options will be sent before "command=fetch". Write server options to the request buffer in send_fetch_request() so that the components of the request are sent in the correct order. The protocol documentation states that the command must come first. The Git server implementation in serve.c (see process_request() in that file) tolerates any order of command and capability, which is perhaps why we haven't noticed this. This was noticed when testing against a JGit server implementation, which follows the documentation in this regard. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 18:01:07 UTC
5fdae9d trace2: fix tracing when NO_PTHREADS is defined Teach trace2 TLS code to not rely on pthread_getspecific() when NO_PTHREADS is defined. Instead, always assume the context data of the main thread. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 17:52:34 UTC
4c785c0 rebase: replace incorrect logical negation by correct bitwise one In bff014dac7d9 (builtin rebase: support the `verbose` and `diffstat` options, 2018-09-04), we added a line that wanted to remove the `REBASE_DIFFSTAT` bit from the flags, but it used an incorrect negation. Found by Coverity. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 17:49:19 UTC
1aed1a5 progress: avoid empty line when breaking the progress line Since commit 545dc345eb (progress: break too long progress bar lines, 2019-04-12) when splitting a too long progress line, sometimes it looks as if a superfluous empty line were added between the title line and the counters. To make sure that the previously displayed progress line is completely covered up when writing the new, shorter title line, we calculate how many characters need to be overwritten with spaces. Alas, this calculation doesn't account for the newline character at the end of the new title line, and resulted in printing one more space than strictly necessary. This extra space character doesn't matter, if the length of the previous progress line was shorter than the width of the terminal. However, if the previous line matched the terminal width, then this extra space made the new line longer, effectively adding that empty line after the title line. Fix this off-by-one to avoid that spurious empty line. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 17:21:11 UTC
4e0d3aa trace2: document the supported values of GIT_TRACE2* env variables The descriptions of the GIT_TRACE2* environment variables link to the technical docs for further details on the supported values. However, a link like this only really works if the docs are viewed in a browser and the full documentation is available. OTOH, in 'man git' there are no links to conveniently click on, and distro-shipped git packages tend to include only the man pages, while the technical docs and the docs in html format are in a separate 'git-doc' package. So let's describe the supported values to make the manpage more self-contained, but still keep the references to the technical docs because the details of the SID, and the JSON and perf output formats are definitely beyond the scope of 'man git'. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 17:20:36 UTC
e4b75d6 trace2: rename environment variables to GIT_TRACE2* For an environment variable that is supposed to be set by users, the GIT_TR2* env vars are just too unclear, inconsistent, and ugly. Most of the established GIT_* environment variables don't use abbreviations, and in case of the few that do (GIT_DIR, GIT_COMMON_DIR, GIT_DIFF_OPTS) it's quite obvious what the abbreviations (DIR and OPTS) stand for. But what does TR stand for? Track, traditional, trailer, transaction, transfer, transformation, transition, translation, transplant, transport, traversal, tree, trigger, truncate, trust, or ...?! The trace2 facility, as the '2' suffix in its name suggests, is supposed to eventually supercede Git's original trace facility. It's reasonable to expect that the corresponding environment variables follow suit, and after the original GIT_TRACE variables they are called GIT_TRACE2; there is no such thing is 'GIT_TR'. All trace2-specific config variables are, very sensibly, in the 'trace2' section, not in 'tr2'. OTOH, we don't gain anything at all by omitting the last three characters of "trace" from the names of these environment variables. So let's rename all GIT_TR2* environment variables to GIT_TRACE2*, before they make their way into a stable release. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 17:20:34 UTC
8e9fe16 gitsubmodules: align html and nroff lists There appears to be a bug in the toolchain generating manpages from lettered lists. When a list is enumerated with letters, the resulting nroff shows numbers instead. Mostly this is harmless, but in the case of gitsubmodules, the paragraph following the list refers back to each bullet by letter. As a result, reading this documentation via `man gitsubmodules` is hard to parse - readers must infer that a bug exists and a refers to 1, b refers to 2, and c refers to 3 in the list above. The problem specifically was introduced in ad47194; previously rather than generating numerated lists the bulleted area was entirely monospaced in HTML and shown in plaintext in nroff. The bug seems to exist in docbook-xml - I've reported it on May 1 via the docbook-apps mail list - but for now it may make more sense to just work around the issue. Signed-off-by: Emily Shaffer <emilyshaffer@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 28 May 2019, 16:42:06 UTC
aa25c82 Git 2.22-rc1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 May 2019, 07:46:42 UTC
fab4a8a Merge branch 'js/difftool-no-index' The "--dir-diff" mode of "git difftool" is not useful in "--no-index" mode; they are now explicitly marked as mutually incompatible. * js/difftool-no-index: difftool --no-index: error out on --dir-diff (and don't crash) 19 May 2019, 07:45:35 UTC
8c59ba9 Merge branch 'jk/get-oid-indexed-object-name' The codepath to parse :<path> that obtains the object name for an indexed object has been made more robust. * jk/get-oid-indexed-object-name: get_oid: handle NULL repo->index 19 May 2019, 07:45:35 UTC
bca6aba Merge branch 'jc/set-packet-header-signature-fix' Code clean-up. * jc/set-packet-header-signature-fix: pkt-line: drop 'const'-ness of a param to set_packet_header() 19 May 2019, 07:45:35 UTC
8cbad49 Merge branch 'cb/http-push-null-in-message-fix' Code clean-up. * cb/http-push-null-in-message-fix: http-push: prevent format overflow warning with gcc >= 9 19 May 2019, 07:45:35 UTC
4ecaede Merge branch 'js/stash-in-c-use-builtin-doc' Doc update. * js/stash-in-c-use-builtin-doc: stash: document stash.useBuiltin 19 May 2019, 07:45:34 UTC
dc58922 Merge branch 'tz/test-lib-check-working-jgit' A prerequiste check in the test suite to see if a working jgit is available was made more robust. * tz/test-lib-check-working-jgit: test-lib: try harder to ensure a working jgit 19 May 2019, 07:45:34 UTC
7a09f5f Merge branch 'js/parseopt-unknown-cb-returns-an-enum' Code clean-up. * js/parseopt-unknown-cb-returns-an-enum: parse-options: adjust `parse_opt_unknown_cb()`s declared return type 19 May 2019, 07:45:34 UTC
ed8a451 Merge branch 'ab/sha1dc' Update collision-detecting SHA-1 code to build properly on HP-UX. * ab/sha1dc: sha1dc: update from upstream 19 May 2019, 07:45:34 UTC
e0708c2 Merge branch 'js/rebase-i-label-shown-in-status-fix' "git status" did not know that the "label" instruction in the todo-list "rebase -i -r" uses should not be shown as a hex object name. * js/rebase-i-label-shown-in-status-fix: status: fix display of rebase -ir's `label` command 19 May 2019, 07:45:33 UTC
dd5b7dc Merge branch 'es/check-non-portable-pre-5.10' Developer support update. * es/check-non-portable-pre-5.10: check-non-portable-shell: support Perl versions older than 5.10 19 May 2019, 07:45:33 UTC
bd96a78 Merge branch 'ds/trace2-document-env-vars' Doc update. * ds/trace2-document-env-vars: trace2: add variable description to git.txt 19 May 2019, 07:45:33 UTC
cfd635c Merge branch 'js/fsmonitor-refresh-after-discarding-index' The fsmonitor interface got out of sync after the in-core index file gets discarded, which has been corrected. * js/fsmonitor-refresh-after-discarding-index: fsmonitor: force a refresh after the index was discarded fsmonitor: demonstrate that it is not refreshed after discard_index() 19 May 2019, 07:45:33 UTC
521d3ef Merge branch 'cm/notes-comment-fix' A stale in-code comment has been updated. * cm/notes-comment-fix: notes: correct documentation of format_display_notes() 19 May 2019, 07:45:32 UTC
b3e0981 Merge branch 'tt/no-ipv6-fallback-for-winxp' Code cleanup. * tt/no-ipv6-fallback-for-winxp: mingw: remove obsolete IPv6-related code 19 May 2019, 07:45:32 UTC
0b076b4 Merge branch 'js/t5580-unc-alternate-test' An additional test for MinGW * js/t5580-unc-alternate-test: t5580: verify that alternates can be UNC paths 19 May 2019, 07:45:32 UTC
b5fb62b Merge branch 'ds/cvsexportcommit-force-text' "git cvsexportcommit" running on msys did not expect cvsnt showed "cvs status" output with CRLF line endings. * ds/cvsexportcommit-force-text: cvsexportcommit: force crlf translation 19 May 2019, 07:45:31 UTC
6f3d93f Merge branch 'sg/ci-libsvn-perl' To run tests for Git SVN, our scripts for CI used to install the git-svn package (in the hope that it would bring in the right dependencies). This has been updated to install the more direct dependency, namely, libsvn-perl. * sg/ci-libsvn-perl: ci: install 'libsvn-perl' instead of 'git-svn' 19 May 2019, 07:45:31 UTC
717dad8 Merge branch 'bl/t4253-exit-code-from-format-patch' Avoid patterns to pipe output from a git command to feed another command in tests. * bl/t4253-exit-code-from-format-patch: t4253-am-keep-cr-dos: avoid using pipes 19 May 2019, 07:45:31 UTC
454b419 Merge branch 'ds/midx-too-many-packs' The code to generate the multi-pack idx file was not prepared to see too many packfiles and ran out of open file descriptor, which has been corrected. * ds/midx-too-many-packs: midx: add packs to packed_git linked list midx: pass a repository pointer 19 May 2019, 07:45:30 UTC
97616ca Merge branch 'en/unicode-in-refnames' On a filesystem like HFS+, the names of the refs stored as filesystem entities may become different from what the end-user expects, just like files in the working tree get "renamed". Work around the mismatch by paying attention to the core.precomposeUnicode configuration. * en/unicode-in-refnames: Honor core.precomposeUnicode in more places 19 May 2019, 07:45:30 UTC
85ac27e Merge branch 'dl/difftool-mergetool' Update "git difftool" and "git mergetool" so that the combinations of {diff,merge}.{tool,guitool} configuration variables serve as fallback settings of each other in a sensible order. * dl/difftool-mergetool: difftool: fallback on merge.guitool difftool: make --gui, --tool and --extcmd mutually exclusive mergetool: fallback to tool when guitool unavailable mergetool--lib: create gui_mode function mergetool: use get_merge_tool function t7610: add mergetool --gui tests t7610: unsuppress output 19 May 2019, 07:45:30 UTC
fed9391 Merge branch 'mh/http-fread-api-fix' A pair of private functions in http.c that had names similar to fread/fwrite did not return the number of elements, which was found to be confusing. * mh/http-fread-api-fix: Make fread/fwrite-like functions in http.c more like fread/fwrite. 19 May 2019, 07:45:29 UTC
b20b8fe Merge branch 'js/t6500-use-windows-pid-on-mingw' Future-proof a test against an update to MSYS2 runtime v3.x series. * js/t6500-use-windows-pid-on-mingw: t6500(mingw): use the Windows PID of the shell 19 May 2019, 07:45:29 UTC
7782066 Merge branch 'jk/apache-lsan' Allow tests that involve httpd to be run under leak sanitizer, just like we can already do so under address sanitizer. * jk/apache-lsan: t/lib-httpd: pass LSAN_OPTIONS through apache 19 May 2019, 07:45:29 UTC
2cfab60 Merge branch 'nd/parse-options-aliases' Attempt to use an abbreviated option in "git clone --recurs" is responded by a request to disambiguate between --recursive and --recurse-submodules, which is bad because these two are synonyms. The parse-options API has been extended to define such synonyms more easily and not produce an unnecessary failure. * nd/parse-options-aliases: parse-options: don't emit "ambiguous option" for aliases 19 May 2019, 07:45:28 UTC
4ac8371 Merge branch 'dl/branch-from-3dot-merge-base' "git branch new A...B" and "git checkout -b new A...B" have been taught that in their contexts, the notation A...B means "the merge base between these two commits", just like "git checkout A...B" detaches HEAD at that commit. * dl/branch-from-3dot-merge-base: branch: make create_branch accept a merge base rev t2018: cleanup in current test 19 May 2019, 07:45:28 UTC
3c9b393 Merge branch 'js/commit-graph-parse-leakfix' Leakfix. * js/commit-graph-parse-leakfix: commit-graph: fix memory leak 19 May 2019, 07:45:28 UTC
6795fc8 Merge branch 'jk/cocci-batch' Optionally "make coccicheck" can feed multiple source files to spatch, gaining performance while spending more memory. * jk/cocci-batch: coccicheck: make batch size of 0 mean "unlimited" coccicheck: optionally batch spatch invocations 19 May 2019, 07:45:28 UTC
82dca95 Merge branch 'ab/perf-installed-fix' Performance test framework has been broken and measured the version of Git that happens to be on $PATH, not the specified one to measure, for a while, which has been corrected. * ab/perf-installed-fix: perf-lib.sh: forbid the use of GIT_TEST_INSTALLED perf tests: add "bindir" prefix to git tree test results perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh perf-lib.sh: make "./run <revisions>" use the correct gits perf aggregate: remove GIT_TEST_INSTALLED from --codespeed perf README: correct docs for 3c8f12c96c regression 19 May 2019, 07:45:28 UTC
f42bee7 Merge branch 'id/windows-dep-aslr' Allow DEP and ASLR for Windows build to for security hardening. * id/windows-dep-aslr: mingw: enable DEP and ASLR mingw: do not let ld strip relocations 19 May 2019, 07:45:27 UTC
d66da83 Merge branch 'ab/trace2-typofix' Typofix. * ab/trace2-typofix: trace2: fix up a missing "leave" entry point 19 May 2019, 07:45:27 UTC
195d799 Merge branch 'nd/submodule-helper-incomplete-line-fix' Typofix. * nd/submodule-helper-incomplete-line-fix: submodule--helper: add a missing \n 19 May 2019, 07:45:27 UTC
18cfb74 Merge branch 'cw/diff-highlight' Portability fix for a diff-highlight tool (in contrib/). * cw/diff-highlight: diff-highlight: use correct /dev/null for UNIX and Windows 19 May 2019, 07:45:26 UTC
1294160 Merge branch 'dl/warn-tagging-a-tag' Typofix. * dl/warn-tagging-a-tag: tag: fix typo in nested tagging hint 19 May 2019, 07:45:26 UTC
8bcd8f4 diff: fix mistake in translatable strings Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 May 2019, 02:01:02 UTC
56bea28 pkt-line: drop 'const'-ness of a param to set_packet_header() The function's definition has a paramter of type "int" qualified as "const". The fact that the incoming parameter is used as read-only in the fuction is an implementation detail that the callers should not have to be told in the prototype declaring it (and "const" there has no effect, as C passes parameters by value). The prototype defined for the function in pkt-line.h lacked the matching "const" for this reason, but apparently some compilers (e.g. MS Visual C 2017) complain about the parameter type mismatch. Let's squelch it by removing the "const" that is pointless in the definition of a small and trivial function like this, which would not help optimizing compilers nor reading humans that much. Noticed-by: Johannes Schindelin <johannes.schindelin@gmx.de> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 May 2019, 04:29:06 UTC
abd0f28 test-lib: try harder to ensure a working jgit The JGIT prereq uses `type jgit` to determine whether jgit is present. While this is usually sufficient, it won't help if the jgit found is badly broken. This wastes time running tests which fail due to no fault of our own. Use `jgit --version` instead, to guard against cases where jgit is present on the system, but will fail to run, e.g. because of some JRE issue, or missing Java dependencies. Checking that it gets far enough to process the '--version' argument isn't perfect, but seems to be good enough in practice. It's also consistent with how we detect some other dependencies, see e.g. the CURL and UNZIP prerequisites. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 May 2019, 05:20:01 UTC
581d2fd get_oid: handle NULL repo->index When get_oid() and its helpers see an index name like ":.gitmodules", they try to load the index on demand, like: if (repo->index->cache) repo_read_index(repo); However, that misses the case when "repo->index" itself is NULL; we'll segfault in the conditional. This never happens with the_repository; there we always point its index field to &the_index. But a submodule repository may have a NULL index field until somebody calls repo_read_index(). This bug is triggered by t7411, but it was hard to notice because it's in an expect_failure block. That test was added by 2b1257e463 (t/helper: add test-submodule-nested-repo-config, 2018-10-25). Back then we had no easy way to access the .gitmodules blob of a submodule repo, so we expected (and got) an error message to that effect. Later, d9b8b8f896 (submodule-config.c: use repo_get_oid for reading .gitmodules, 2019-04-16) started looking in the correct repo, which is when we started triggering the segfault. With this fix, the test starts passing (once we clean it up as its comment instructs). Note that as far as I know, this bug could not be triggered outside of the test suite. It requires resolving an index name in a submodule, and all of the code paths (aside from test-tool) which do that either load the index themselves, or always pass the_repository. Ultimately it comes from 3a7a698e93 (sha1-name.c: remove implicit dependency on the_index, 2019-01-12), which replaced a check of "the_index.cache" with "repo->index->cache". So even if there is another way to trigger it, it wouldn't affect any versions before then. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 May 2019, 05:08:42 UTC
9dde06d http-push: prevent format overflow warning with gcc >= 9 In function 'finish_request', inlined from 'process_response' at http-push.c:248:2: http-push.c:587:4: warning: '%s' directive argument is null [-Wformat-overflow=] 587 | fprintf(stderr, "Unable to get pack file %s\n%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 588 | request->url, curl_errorstr); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ request->url is needed for the error message if there was a failure during fetch but was being cleared unnecessarily earlier. note that the leak is prevented by calling release_request unconditionally at the end. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Suggested-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 May 2019, 02:03:08 UTC
336ad84 stash: document stash.useBuiltin The stash.useBuiltin variable introduced in 90a462725e ("stash: optionally use the scripted version again", 2019-02-25) was turned on by default, but had no documentation. Let's document it so that users who run into any stability issues with the C rewrite know there's an escape hatch, and spell out that the user should please report the bug when they have to turn off the built-in stash. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 May 2019, 01:47:20 UTC
4125f78 sha1dc: update from upstream Update sha1dc from the latest version by the upstream maintainer[1]. See 07a20f569b ("Makefile: fix unaligned loads in sha1dc with UBSan", 2019-03-12) for the last update. This fixes an issue where HP-UX IA64 was wrongly detected as a Little-endian instead of a Big-endian system, see [2] and [3]. 1. https://github.com/cr-marcstevens/sha1collisiondetection/commit/855827c583bc30645ba427885caa40c5b81764d2 2. https://public-inbox.org/git/603989bd-f86d-c61d-c6f5-fb6748a65ba9@siemens.com/ 3. https://github.com/cr-marcstevens/sha1collisiondetection/pull/50 Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 May 2019, 07:45:01 UTC
567fce1 parse-options: adjust `parse_opt_unknown_cb()`s declared return type In f41179f16ba2 (parse-options: avoid magic return codes, 2019-01-27), the signature of the low-level parse-opt callback function was changed to return an `enum`. And while the implementations were changed, one declaration was left unchanged, still claiming to return `int`. This can potentially lead to problems, as compilers are free to choose any integral type for an `enum` as long as it can represent all declared values. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 May 2019, 07:42:31 UTC
ab15ad1 Git 2.22-rc0 Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 14:50:35 UTC
49bc8ce Merge branch 'jh/trace2' A few embarrassing bugfixes. * jh/trace2: trace2: fix up a missing "leave" entry point trace2: fix incorrect function pointer check 13 May 2019, 14:50:35 UTC
40bef49 Merge branch 'cc/access-on-aix-workaround' Workaround for standard-compliant but less-than-useful behaviour of access(2) for the root user. * cc/access-on-aix-workaround: git-compat-util: work around for access(X_OK) under root 13 May 2019, 14:50:35 UTC
b51a0fd Merge branch 'pw/clean-sequencer-state-upon-final-commit' "git chery-pick" (and "revert" that shares the same runtime engine) that deals with multiple commits got confused when the final step gets stopped with a conflict and the user concluded the sequence with "git commit". Attempt to fix it by cleaning up the state files used by these commands in such a situation. * pw/clean-sequencer-state-upon-final-commit: fix cherry-pick/revert status after commit commit/reset: try to clean up sequencer state 13 May 2019, 14:50:35 UTC
7ba06bc Merge branch 'pw/rebase-i-internal' The internal implementation of "git rebase -i" has been updated to avoid forking a separate "rebase--interactive" process. * pw/rebase-i-internal: rebase -i: run without forking rebase--interactive rebase: use a common action enum rebase -i: use struct rebase_options in do_interactive_rebase() rebase -i: use struct rebase_options to parse args rebase -i: use struct object_id for squash_onto rebase -i: use struct commit when parsing options rebase -i: remove duplication rebase -i: combine rebase--interactive.c with rebase.c rebase: use OPT_RERERE_AUTOUPDATE() rebase: rename write_basic_state() rebase: don't translate trace strings sequencer: always discard index after checkout 13 May 2019, 14:50:34 UTC
6cfa633 Merge branch 'jk/perf-aggregate-wo-libjson' The script to aggregate perf result unconditionally depended on libjson-perl even though it did not have to, which has been corrected. * jk/perf-aggregate-wo-libjson: t/perf: depend on perl JSON only when using --codespeed 13 May 2019, 14:50:34 UTC
7a188da Merge branch 'dl/rev-tilde-doc-clarify' Docfix. * dl/rev-tilde-doc-clarify: revisions.txt: remove ambibuity between <rev>:<path> and :<path> revisions.txt: mention <rev>~ form revisions.txt: mark optional rev arguments with [] revisions.txt: change "rev" to "<rev>" 13 May 2019, 14:50:34 UTC
a505f62 Merge branch 'jc/make-dedup-ls-files-output' A "ls-files" that emulates "find" to enumerate files in the working tree resulted in duplicated Makefile rules that caused the build to issue an unnecessary warning during a trial build after merge conflicts are resolved in working tree *.h files but before the resolved results are added to the index. This has been corrected. * jc/make-dedup-ls-files-output: Makefile: dedup list of files obtained from ls-files 13 May 2019, 14:50:33 UTC
8293ee0 Merge branch 'jk/ls-files-doc-markup-fix' Docfix. * jk/ls-files-doc-markup-fix: doc/ls-files: put nested list for "-t" option into block 13 May 2019, 14:50:33 UTC
e7a1b38 Merge branch 'jk/p5302-avoid-collision-check-cost' Fix index-pack perf test so that the repeated invocations always run in an empty repository, which emulates the initial clone situation better. * jk/p5302-avoid-collision-check-cost: p5302: create the repo in each index-pack test 13 May 2019, 14:50:32 UTC
4aeeef3 Merge branch 'dl/no-extern-in-func-decl' Mechanically and systematically drop "extern" from function declarlation. * dl/no-extern-in-func-decl: *.[ch]: manually align parameter lists *.[ch]: remove extern from function declarations using sed *.[ch]: remove extern from function declarations using spatch 13 May 2019, 14:50:32 UTC
2bfb182 Merge branch 'ew/repack-with-bitmaps-by-default' The connectivity bitmaps are created by default in bare repositories now; also the pathname hash-cache is created by default to avoid making crappy deltas when repacking. * ew/repack-with-bitmaps-by-default: pack-objects: default to writing bitmap hash-cache t5310: correctly remove bitmaps for jgit test repack: enable bitmaps by default on bare repos 13 May 2019, 14:50:32 UTC
5b51f0d Merge branch 'js/partial-clone-connectivity-check' During an initial "git clone --depth=..." partial clone, it is pointless to spend cycles for a large portion of the connectivity check that enumerates and skips promisor objects (which by definition is all objects fetched from the other side). This has been optimized out. * js/partial-clone-connectivity-check: t/perf: add perf script for partial clones clone: do faster object check for partial clones 13 May 2019, 14:50:32 UTC
5b2d1c0 Merge branch 'jh/trace2-sid-fix' Polishing of the new trace2 facility continues. The system-level configuration can specify site-wide trace2 settings, which can be overridden with per-user configuration and environment variables. * jh/trace2-sid-fix: trace2: fixup access problem on /etc/gitconfig in read_very_early_config trace2: update docs to describe system/global config settings trace2: make SIDs more unique trace2: clarify UTC datetime formatting trace2: report peak memory usage of the process trace2: use system/global config for default trace2 settings config: add read_very_early_config() trace2: find exec-dir before trace2 initialization trace2: add absolute elapsed time to start event trace2: refactor setting process starting time config: initialize opts structure in repo_read_config() 13 May 2019, 14:50:31 UTC
6c22d71 difftool: fallback on merge.guitool In git-difftool.txt, it says 'git difftool' falls back to 'git mergetool' config variables when the difftool equivalents have not been defined. However, when `diff.guitool` is missing, it doesn't fallback to anything. Make git-difftool fallback to `merge.guitool` when `diff.guitool` is missing. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 14:11:59 UTC
7f978d7 difftool: make --gui, --tool and --extcmd mutually exclusive In git-difftool, these options specify which tool to ultimately run. As a result, they are logically conflicting. Explicitly disallow these options from being used together. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 14:11:59 UTC
60aced3 mergetool: fallback to tool when guitool unavailable In git-difftool, if the tool is called with --gui but `diff.guitool` is not set, it falls back to `diff.tool`. Make git-mergetool also fallback from `merge.guitool` to `merge.tool` if the former is undefined. If git-difftool, when called with `--gui`, were to use `get_configured_mergetool` in a future patch, it would also get the fallback behavior in the following precedence: 1. diff.guitool 2. merge.guitool 3. diff.tool 4. merge.tool The behavior for when difftool or mergetool are called without `--gui` should be identical with or without this patch. Note that the search loop could be written as sections="merge" keys="tool" if diff_mode then sections="diff $sections" fi if gui_mode then keys="guitool $keys" fi merge_tool=$( IFS=' ' for key in $keys do for section in $sections do selected=$(git config $section.$key) if test -n "$selected" then echo "$selected" return fi done done) which would make adding a mode in the future much easier. However, adding a new mode will likely never happen as it is highly discouraged so, as a result, it is written in its current form so that it is more readable for future readers. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 14:11:59 UTC
884630b mergetool--lib: create gui_mode function Before, in `get_configured_merge_tool`, we would test the value of the first argument directly, which corresponded to whether we were using guitool. However, since `$GIT_MERGETOOL_GUI` is available as an environment variable, create the `gui_mode` function which increases the clarify of functions which use it. While we're at it, add a space before `()` in function definitions to fix the style. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 14:11:59 UTC
05fb872 mergetool: use get_merge_tool function In git-mergetool, the logic for getting which merge tool to use is duplicated in git-mergetool--lib, except for the fact that it needs to know whether the tool was guessed or not. Rewrite `get_merge_tool` to return whether or not the tool was guessed through the return code and make git-mergetool call this function instead of duplicating the logic. Note that 1 was chosen to be the return code of when a tool is guessed because it seems like a slightly more abnormal condition than getting a tool that's explicitly specified but this is completely arbitrary. Also, let `$GIT_MERGETOOL_GUI` be set to determine whether or not the guitool will be selected. This change is not completely backwards compatible as there may be external users of git-mergetool--lib. However, only one user, git-diffall[1], was found from searching GitHub and Google, and this tool is superseded by `git difftool --dir-diff` anyway. It seems very unlikely that there exists an external caller that would take into account the return code of `get_merge_tool` as it would always return 0 before this change so this change probably does not affect any external users. [1]: https://github.com/thenigan/git-diffall Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 14:11:59 UTC
04b7e86 trace2: add variable description to git.txt Documentation/technical/api-trace2.txt contains the full details of the trace2 API and the GIT_TR2* environment variables. However, most environment variables are included in Documentation/git.txt, including the GIT_TRACE* variables. Add a brief description of the GIT_TR2* variables with links to the full technical details. The biggest difference from the original variables is that we can specify a Unix Domain Socket. Mention this difference, but leave the details to the technical documents. Reported-by: Szeder Gábor <szeder.dev@gmail.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 13:54:02 UTC
225a777 status: fix display of rebase -ir's `label` command The argument of a `label` command does *not* want to be turned into an abbreviated SHA-1. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 06:38:21 UTC
7fef4e3 trace2: fix up a missing "leave" entry point Fix a trivial bug that's been here since the shared/do_write_index tracing was added in 42fee7a388 ("trace2:data: add trace2 instrumentation to index read/write", 2019-02-22). We should have enter/leave points, not two enter/enter points. This resulted in an "enter" event without a corresponding "leave" event. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 06:14:34 UTC
142997d check-non-portable-shell: support Perl versions older than 5.10 For thoroughness when checking for one-shot environment variable assignments at shell function call sites, check-non-portable-shell stitches together incomplete lines (those ending with backslash). This allows it to correctly flag such undesirable usage even when the variable assignment and function call are split across lines, for example: FOO=bar \ func where 'func' is a shell function. The stitching is accomplished like this: while (<>) { chomp; # stitch together incomplete lines (those ending with "\") while (s/\\$//) { $_ .= readline; chomp; } # detect unportable/undesirable shell constructs ... } Although this implementation is well supported in reasonably modern Perl versions (5.10 and later), it fails with older versions (such as Perl 5.8 shipped with ancient Mac OS 10.5). In particular, in older Perl versions, 'readline' is not connected to the file handle associated with the "magic" while (<>) {...} construct, so 'readline' throws a "readline() on unopened filehandle" error. Work around this problem by dropping readline() and instead incorporating the stitching of incomplete lines directly into the existing while (<>) {...} loop. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 02:50:20 UTC
ce6a158 mingw: enable DEP and ASLR Enable DEP (Data Execution Prevention) and ASLR (Address Space Layout Randomization) support. This applies to both 32bit and 64bit builds and makes it substantially harder to exploit security holes in Git by offering a much more unpredictable attack surface. ASLR interferes with GDB's ability to set breakpoints. A similar issue holds true when compiling with -O2 (in which case single-stepping is messed up because GDB cannot map the code back to the original source code properly). Therefore we simply enable ASLR only when an optimization flag is present in the CFLAGS, using it as an indicator that the developer does not want to debug in GDB anyway. Signed-off-by: İsmail Dönmez <ismail@i10z.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 01:55:20 UTC
598b6c3 mingw: do not let ld strip relocations This is the first step for enabling ASLR (Address Space Layout Randomization) support. We want to enable ASLR for better protection against exploiting security holes in Git: it makes it harder to attack software by making code addresses unpredictable. The problem fixed by this commit is that `ld.exe` seems to be stripping relocations which in turn will break ASLR support. We just make sure it's not stripping the main executable entry. Signed-off-by: İsmail Dönmez <ismail@i10z.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 May 2019, 01:55:18 UTC
c173542 trace2: fix up a missing "leave" entry point Fix a trivial bug that's been here since the shared/do_write_index tracing was added in 42fee7a388 ("trace2:data: add trace2 instrumentation to index read/write", 2019-02-22). We should have enter/leave points, not two enter/enter points. This resulted in an "enter" event without a corresponding "leave" event. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 May 2019, 14:14:09 UTC
f3a3a02 difftool --no-index: error out on --dir-diff (and don't crash) In `--no-index` mode, we now no longer require a worktree nor a repository. But some code paths in `difftool` expect those to be present. The most notable such code path is the `--dir-diff` one: we use the existing checkout machinery to copy the files, and that machinery looks up replacement refs, looks at alternate ODBs, wants to use the worktree path, etc. Rather than running into segmentation faults, let's die with an informative error message. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 May 2019, 07:29:27 UTC
a54b2ab tag: fix typo in nested tagging hint In eea9c1e78f (tag: advise on nested tags, 2019-04-04), tag was taught to hint at the user if a nested tag is made. However, this message had a typo and it said "The object referred to by your new is...", which was missing a "tag" after "new". Fix this message by adding the "tag". Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 May 2019, 06:10:38 UTC
6804ba3 diff-highlight: use correct /dev/null for UNIX and Windows Use File::Spec->devnull() for output redirection to avoid messages when Windows version of Perl is first in path. The message 'The system cannot find the path specified.' is displayed each time git is run to get colors. Signed-off-by: Chris. Webster <chris@webstech.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 May 2019, 03:18:44 UTC
6a6c0f1 The eighth batch Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 May 2019, 15:37:54 UTC
f832bcc Merge branch 'vk/autoconf-gettext' The autoconf generated configure script failed to use the right gettext() implementations from -libintl by ignoring useless stub implementations shipped in some C library, which has been corrected. * vk/autoconf-gettext: autoconf: #include <libintl.h> when checking for gettext() 08 May 2019, 15:37:29 UTC
1ff440f Merge branch 'cc/aix-has-fileno-as-a-macro' AIX shared the same build issues with other BSDs around fileno(fp), which has been corrected. * cc/aix-has-fileno-as-a-macro: Makefile: use fileno macro work around on AIX 08 May 2019, 15:37:28 UTC
ec2642a Merge branch 'jt/submodule-repo-is-with-worktree' The logic to tell if a Git repository has a working tree protects "git branch -D" from removing the branch that is currently checked out by mistake. The implementation of this logic was broken for repositories with unusual name, which unfortunately is the norm for submodules these days. This has been fixed. * jt/submodule-repo-is-with-worktree: worktree: update is_bare heuristics 08 May 2019, 15:37:28 UTC
5b5def9 Merge branch 'jk/untracked-cache-more-fixes' Code clean-up. * jk/untracked-cache-more-fixes: untracked-cache: simplify parsing by dropping "len" untracked-cache: simplify parsing by dropping "next" untracked-cache: be defensive about missing NULs in index 08 May 2019, 15:37:28 UTC
back to top