https://github.com/git/git

sort by:
Revision Author Date Message Commit Date
84d06cd Sync with v2.31.1 26 March 2021, 21:59:47 UTC
26c4f98 The fourth batch Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 March 2021, 21:59:03 UTC
89519f6 Merge branch 'cm/rebase-i-fixup-amend-reword' "git commit --fixup=<commit>", which was to tweak the changes made to the contents while keeping the original log message intact, learned "--fixup=(amend|reword):<commit>", that can be used to tweak both the message and the contents, and only the message, respectively. * cm/rebase-i-fixup-amend-reword: doc/git-commit: add documentation for fixup=[amend|reword] options t3437: use --fixup with options to create amend! commit t7500: add tests for --fixup=[amend|reword] options commit: add a reword suboption to --fixup commit: add amend suboption to --fixup to create amend! commit sequencer: export and rename subject_length() 26 March 2021, 21:59:03 UTC
fde07fc Merge branch 'cm/rebase-i-updates' Follow-up fixes to "cm/rebase-i" topic. * cm/rebase-i-updates: doc/rebase -i: fix typo in the documentation of 'fixup' command t/t3437: fixup the test 'multiple fixup -c opens editor once' t/t3437: use named commits in the tests t/t3437: simplify and document the test helpers t/t3437: check the author date of fixed up commit t/t3437: remove the dependency of 'expected-message' file from tests t/t3437: fixup here-docs in the 'setup' test t/lib-rebase: update the documentation of FAKE_LINES rebase -i: clarify and fix 'fixup -c' rebase-todo help sequencer: rename a few functions sequencer: fixup the datatype of the 'flag' argument 26 March 2021, 21:59:03 UTC
ce4296c Merge branch 'cm/rebase-i' "rebase -i" is getting cleaned up and also enhanced. * cm/rebase-i: doc/git-rebase: add documentation for fixup [-C|-c] options rebase -i: teach --autosquash to work with amend! t3437: test script for fixup [-C|-c] options in interactive rebase rebase -i: add fixup [-C | -c] command sequencer: use const variable for commit message comments sequencer: pass todo_item to do_pick_commit() rebase -i: comment out squash!/fixup! subjects from squash message sequencer: factor out code to append squash message rebase -i: only write fixup-message when it's needed 26 March 2021, 21:59:03 UTC
8c81fce Merge branch 'js/http-pki-credential-store' The http codepath learned to let the credential layer to cache the password used to unlock a certificate that has successfully been used. * js/http-pki-credential-store: http: drop the check for an empty proxy password before approving http: store credential when PKI auth is used 26 March 2021, 21:59:02 UTC
ed953e1 Merge branch 'ab/make-cleanup' Reorganize Makefile to allow building git.o and other essential objects without extra stuff needed only for testing. * ab/make-cleanup: Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targets Makefile: split OBJECTS into OBJECTS and GIT_OBJS Makefile: sort OBJECTS assignment for subsequent change Makefile: split up long OBJECTS line Makefile: guard against TEST_OBJS in the environment 26 March 2021, 21:59:02 UTC
48bf2fa Git 2.31.1 Signed-off-by: Junio C Hamano <gitster@pobox.com> 26 March 2021, 21:49:41 UTC
9198c13 The third patch Signed-off-by: Junio C Hamano <gitster@pobox.com> 24 March 2021, 21:36:27 UTC
858119f Merge branch 'nk/diff-index-fsmonitor' "git diff-index" codepath has been taught to trust fsmonitor status to reduce number of lstat() calls. * nk/diff-index-fsmonitor: fsmonitor: add perf test for git diff HEAD fsmonitor: add assertion that fsmonitor is valid to check_removed fsmonitor: skip lstat deletion check during git diff-index 24 March 2021, 21:36:27 UTC
e537784 Merge branch 'jk/fail-prereq-testfix' GIT_TEST_FAIL_PREREQS is a mechanism to skip test pieces with prerequisites to catch broken tests that depend on the side effects of optional pieces, but did not work at all when negative prerequisites were involved. * jk/fail-prereq-testfix: t: annotate !PTHREADS tests with !FAIL_PREREQS 24 March 2021, 21:36:27 UTC
2744383 Merge branch 'tb/geometric-repack' "git repack" so far has been only capable of repacking everything under the sun into a single pack (or split by size). A cleverer strategy to reduce the cost of repacking a repository has been introduced. * tb/geometric-repack: builtin/pack-objects.c: ignore missing links with --stdin-packs builtin/repack.c: reword comment around pack-objects flags builtin/repack.c: be more conservative with unsigned overflows builtin/repack.c: assign pack split later t7703: test --geometric repack with loose objects builtin/repack.c: do not repack single packs with --geometric builtin/repack.c: add '--geometric' option packfile: add kept-pack cache for find_kept_pack_entry() builtin/pack-objects.c: rewrite honor-pack-keep logic p5303: measure time to repack with keep p5303: add missing &&-chains builtin/pack-objects.c: add '--stdin-packs' option revision: learn '--no-kept-objects' packfile: introduce 'find_kept_pack_entry()' 24 March 2021, 21:36:27 UTC
c6617d1 Merge branch 'tb/push-simple-uses-branch-merge-config' Doc update. * tb/push-simple-uses-branch-merge-config: Documentation/git-push.txt: correct configuration typo 24 March 2021, 21:36:27 UTC
1424303 The second batch Signed-off-by: Junio C Hamano <gitster@pobox.com> 22 March 2021, 21:00:25 UTC
3099d4f Merge branch 'bc/clone-bare-with-conflicting-config' "git -c core.bare=false clone --bare ..." would have segfaulted, which has been corrected. * bc/clone-bare-with-conflicting-config: builtin/init-db: handle bare clones when core.bare set to false 22 March 2021, 21:00:25 UTC
d4bda9b Merge branch 'jk/filter-branch-sha256' Code clean-up. * jk/filter-branch-sha256: filter-branch: drop $_x40 glob filter-branch: drop multiple-ancestor warning t7003: test ref rewriting explicitly 22 March 2021, 21:00:25 UTC
20adca9 Merge branch 'ps/update-ref-trans-hook-doc' Doc update. * ps/update-ref-trans-hook-doc: githooks.txt: clarify documentation on reference-transaction hook githooks.txt: replace mentions of SHA-1 specific properties 22 March 2021, 21:00:25 UTC
960f466 Merge branch 'rr/mailmap-entry-self' * rr/mailmap-entry-self: Add entry for Ramkumar Ramachandra 22 March 2021, 21:00:25 UTC
3d92c0a Merge branch 'jr/doc-ignore-typofix' Doc cleanup. * jr/doc-ignore-typofix: doc: .gitignore documentation typofix 22 March 2021, 21:00:25 UTC
44e03bf Merge branch 'sv/t9801-test-path-is-file-cleanup' Test cleanup. * sv/t9801-test-path-is-file-cleanup: t9801: replace test -f with test_path_is_file 22 March 2021, 21:00:24 UTC
c83d602 Merge branch 'dl/cat-file-doc-cleanup' Doc cleanup. * dl/cat-file-doc-cleanup: git-cat-file.txt: remove references to "sha1" git-cat-file.txt: monospace args, placeholders and filenames 22 March 2021, 21:00:24 UTC
25f9326 Merge branch 'rs/pretty-describe' "git log --format='...'" learned "%(describe)" placeholder. * rs/pretty-describe: archive: expand only a single %(describe) per archive pretty: document multiple %(describe) being inconsistent t4205: assert %(describe) test coverage pretty: add merge and exclude options to %(describe) pretty: add %(describe) 22 March 2021, 21:00:24 UTC
f5c73f6 Merge branch 'dl/stash-show-untracked' "git stash show" learned to optionally show untracked part of the stash. * dl/stash-show-untracked: stash show: learn stash.showIncludeUntracked stash show: teach --include-untracked and --only-untracked 22 March 2021, 21:00:24 UTC
dd4048d Merge branch 'en/ort-perf-batch-8' Rename detection rework continues. * en/ort-perf-batch-8: diffcore-rename: compute dir_rename_guess from dir_rename_counts diffcore-rename: limit dir_rename_counts computation to relevant dirs diffcore-rename: compute dir_rename_counts in stages diffcore-rename: extend cleanup_dir_rename_info() diffcore-rename: move dir_rename_counts into dir_rename_info struct diffcore-rename: add function for clearing dir_rename_count Move computation of dir_rename_count from merge-ort to diffcore-rename diffcore-rename: add a mapping of destination names to their indices diffcore-rename: provide basic implementation of idx_possible_rename() diffcore-rename: use directory rename guided basename comparisons 22 March 2021, 21:00:24 UTC
24119d9 Merge branch 'ab/grep-pcre2-allocfix' Updates to memory allocation code around the use of pcre2 library. * ab/grep-pcre2-allocfix: grep/pcre2: move definitions of pcre2_{malloc,free} grep/pcre2: move back to thread-only PCREv2 structures grep/pcre2: actually make pcre2 use custom allocator grep/pcre2: use pcre2_maketables_free() function grep/pcre2: use compile-time PCREv2 version test grep/pcre2: add GREP_PCRE2_DEBUG_MALLOC debug mode grep/pcre2: prepare to add debugging to pcre2_malloc() grep/pcre2: correct reference to grep_init() in comment grep/pcre2: drop needless assignment to NULL grep/pcre2: drop needless assignment + assert() on opt->pcre2 22 March 2021, 21:00:23 UTC
e8d5a42 Merge branch 'jk/perf-in-worktrees' Perf test update to work better in secondary worktrees. * jk/perf-in-worktrees: t/perf: avoid copying worktree files from test repo t/perf: handle worktrees as test repos 22 March 2021, 21:00:23 UTC
d20fa3c Merge branch 'ds/commit-graph-generation-config' A new configuration variable has been introduced to allow choosing which version of the generation number gets used in the commit-graph file. * ds/commit-graph-generation-config: commit-graph: use config to specify generation type commit-graph: create local repository pointer 22 March 2021, 21:00:23 UTC
52182e3 Merge branch 'ab/remote-write-config-in-camel-case' Update C code that sets a few configuration variables when a remote is configured so that it spells configuration variable names in the canonical camelCase. * ab/remote-write-config-in-camel-case: remote: write camel-cased *.pushRemote on rename remote: add camel-cased *.tagOpt key, like clone 22 March 2021, 21:00:23 UTC
2435fea Merge branch 'mt/cleanly-die-upon-missing-required-filter' We had a code to diagnose and die cleanly when a required clean/smudge filter is missing, but an assert before that unnecessarily fired, hiding the end-user facing die() message. * mt/cleanly-die-upon-missing-required-filter: convert: fail gracefully upon missing clean cmd on required filter 22 March 2021, 21:00:22 UTC
204333b Merge branch 'jk/open-dotgitx-with-nofollow' It does not make sense to make ".gitattributes", ".gitignore" and ".mailmap" symlinks, as they are supposed to be usable from the object store (think: bare repositories where HEAD:.mailmap etc. are used). When these files are symbolic links, we used to read the contents of the files pointed by them by mistake, which has been corrected. * jk/open-dotgitx-with-nofollow: mailmap: do not respect symlinks for in-tree .mailmap exclude: do not respect symlinks for in-tree .gitignore attr: do not respect symlinks for in-tree .gitattributes exclude: add flags parameter to add_patterns() attr: convert "macro_ok" into a flags field add open_nofollow() helper 22 March 2021, 21:00:22 UTC
98164e9 The first batch in 2.32 cycle Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 March 2021, 22:25:40 UTC
ef486a9 Merge branch 'tb/git-mv-icase-fix' Fix a corner case bug in "git mv" on case insensitive systems, which was introduced in 2.29 timeframe. * tb/git-mv-icase-fix: git mv foo FOO ; git mv foo bar gave an assert 19 March 2021, 22:25:40 UTC
bfcc6e2 Merge branch 'rs/xcalloc-takes-nelem-first' Code cleanup. * rs/xcalloc-takes-nelem-first: fix xcalloc() argument order 19 March 2021, 22:25:39 UTC
af10702 Merge branch 'ah/make-fuzz-all-doc-update' Update insn in Makefile comments to run fuzz-all target. * ah/make-fuzz-all-doc-update: Makefile: update 'make fuzz-all' docs to reflect modern clang 19 March 2021, 22:25:39 UTC
c691e91 Merge branch 'jk/slimmed-down' Unused code removal. * jk/slimmed-down: vcs-svn: remove header files as well 19 March 2021, 22:25:38 UTC
92ccd7b Merge branch 'rs/calloc-array' CALLOC_ARRAY() macro replaces many uses of xcalloc(). * rs/calloc-array: cocci: allow xcalloc(1, size) use CALLOC_ARRAY git-compat-util.h: drop trailing semicolon from macro definition 19 March 2021, 22:25:38 UTC
a8a0ac3 Merge branch 'rs/avoid-null-statement-after-macro-call' Fix macros that can silently inject unintended null-statements. * rs/avoid-null-statement-after-macro-call: mem-pool: drop trailing semicolon from macro definition block-sha1: drop trailing semicolon from macro definition 19 March 2021, 22:25:38 UTC
948e8ac Merge branch 'km/config-doc-typofix' Docfix. * km/config-doc-typofix: config.txt: add missing period 19 March 2021, 22:25:38 UTC
cc930b7 Merge branch 'jt/clone-unborn-head' Test fix. * jt/clone-unborn-head: t5606: run clone branch name test with protocol v2 19 March 2021, 22:25:38 UTC
1dd4e74 Merge branch 'js/fsmonitor-unpack-fix' The data structure used by fsmonitor interface was not properly duplicated during an in-core merge, leading to use-after-free etc. * js/fsmonitor-unpack-fix: fsmonitor: do not forget to release the token in `discard_index()` fsmonitor: fix memory corruption in some corner cases 19 March 2021, 22:25:37 UTC
35381b1 Merge branch 'jk/bisect-peel-tag-fix' "git bisect" reimplemented more in C during 2.30 timeframe did not take an annotated tag as a good/bad endpoint well. This regression has been corrected. * jk/bisect-peel-tag-fix: bisect: peel annotated tags to commits 19 March 2021, 22:25:37 UTC
8779c14 Merge branch 'jh/fsmonitor-prework' The fsmonitor interface read from its input without making sure there is something to read from. This bug is new in 2.31 timeframe. * jh/fsmonitor-prework: fsmonitor: avoid global-buffer-overflow READ when checking trivial response 19 March 2021, 22:25:37 UTC
eabacfd Merge branch 'jc/calloc-fix' Code clean-up. * jc/calloc-fix: xcalloc: use CALLOC_ARRAY() when applicable 19 March 2021, 22:25:37 UTC
14e7b83 builtin/pack-objects.c: ignore missing links with --stdin-packs When 'git pack-objects --stdin-packs' encounters a commit in a pack, it marks it as a starting point of a best-effort reachability traversal that is used to populate the name-hash of the objects listed in the given packs. The traversal expects that it should be able to walk the ancestors of all commits in a pack without issue. Ordinarily this is the case, but it is possible to having missing parents from an unreachable part of the repository. In that case, we'd consider any missing objects in the unreachable portion of the graph to be junk. This should be handled gracefully: since the traversal is best-effort (i.e., we don't strictly need to fill in all of the name-hash fields), we should simply ignore any missing links. This patch does that (by setting the 'ignore_missing_links' bit on the rev_info struct), and ensures we don't regress in the future by adding a test which demonstrates this case. It is a little over-eager, since it will also ignore missing links in reachable parts of the packs (which would indicate a corrupted repository), but '--stdin-packs' is explicitly *not* about reachability. So this step isn't making anything worse for a repository which contains packs missing reachable objects (since we never drop objects with '--stdin-packs'). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 19 March 2021, 18:19:29 UTC
27d578d t: annotate !PTHREADS tests with !FAIL_PREREQS Some tests in t5300 and t7810 expect us to complain about a "--threads" argument when Git is compiled without pthread support. Running these under GIT_TEST_FAIL_PREREQS produces a confusing failure: we pretend to the tests that there is no pthread support, so they expect the warning, but of course the actual build is perfectly happy to respect the --threads argument. We never noticed before the recent a926c4b904 (tests: remove most uses of C_LOCALE_OUTPUT, 2021-02-11), because the tests also were marked as requiring the C_LOCALE_OUTPUT prerequisite. Which means they'd never have run in FAIL_PREREQS mode, since it would always pretend that the locale prereq was not satisfied. These tests can't possibly work in this mode; it is a mismatch between what the tests expect and what the build was told to do. So let's just mark them to be skipped, using the special prereq introduced by dfe1a17df9 (tests: add a special setup where prerequisites fail, 2019-05-13). Reported-by: Son Luong Ngoc <sluongng@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 March 2021, 21:17:30 UTC
7e5aa13 fsmonitor: add perf test for git diff HEAD Update the xargs call so that if your large repo contains symlinks, test-tool chmtime failure does not end the script. On Linux Test this tree upstream/master --------------------------------------------------------------------------------------------------------- 7519.4: status (fsmonitor=fsmonitor-watchman) 0.52(0.43+0.10) 0.53(0.49+0.05) +1.9% 7519.5: status -uno (fsmonitor=fsmonitor-watchman) 0.21(0.15+0.07) 0.22(0.13+0.09) +4.8% 7519.6: status -uall (fsmonitor=fsmonitor-watchman) 1.65(0.93+0.71) 1.69(1.03+0.65) +2.4% 7519.7: status (dirty) (fsmonitor=fsmonitor-watchman) 11.99(11.34+1.58) 11.95(11.02+1.79) -0.3% 7519.8: diff (fsmonitor=fsmonitor-watchman) 0.25(0.17+0.26) 0.25(0.18+0.26) +0.0% 7519.9: diff HEAD (fsmonitor=fsmonitor-watchman) 0.39(0.25+0.34) 0.89(0.35+0.74) +128.2% 7519.10: diff -- 0_files (fsmonitor=fsmonitor-watchman) 0.16(0.13+0.04) 0.16(0.12+0.05) +0.0% 7519.11: diff -- 10_files (fsmonitor=fsmonitor-watchman) 0.16(0.12+0.05) 0.16(0.12+0.05) +0.0% 7519.12: diff -- 100_files (fsmonitor=fsmonitor-watchman) 0.16(0.12+0.05) 0.16(0.12+0.05) +0.0% 7519.13: diff -- 1000_files (fsmonitor=fsmonitor-watchman) 0.16(0.11+0.06) 0.16(0.12+0.05) +0.0% 7519.14: diff -- 10000_files (fsmonitor=fsmonitor-watchman) 0.18(0.13+0.06) 0.17(0.10+0.08) -5.6% 7519.15: add (fsmonitor=fsmonitor-watchman) 2.25(1.53+0.68) 2.25(1.47+0.74) +0.0% 7519.18: status (fsmonitor=disabled) 0.88(0.73+1.03) 0.89(0.67+1.08) +1.1% 7519.19: status -uno (fsmonitor=disabled) 0.45(0.43+0.89) 0.45(0.34+0.98) +0.0% 7519.20: status -uall (fsmonitor=disabled) 1.88(1.16+1.58) 1.88(1.22+1.51) +0.0% 7519.21: status (dirty) (fsmonitor=disabled) 7.53(7.05+2.11) 7.53(6.98+2.04) +0.0% 7519.22: diff (fsmonitor=disabled) 0.42(0.37+0.92) 0.42(0.38+0.91) +0.0% 7519.23: diff HEAD (fsmonitor=disabled) 0.44(0.41+0.90) 0.44(0.40+0.91) +0.0% 7519.24: diff -- 0_files (fsmonitor=disabled) 0.13(0.09+0.05) 0.13(0.09+0.05) +0.0% 7519.25: diff -- 10_files (fsmonitor=disabled) 0.13(0.10+0.04) 0.13(0.10+0.04) +0.0% 7519.26: diff -- 100_files (fsmonitor=disabled) 0.13(0.09+0.05) 0.13(0.10+0.04) +0.0% 7519.27: diff -- 1000_files (fsmonitor=disabled) 0.13(0.09+0.06) 0.13(0.09+0.05) +0.0% 7519.28: diff -- 10000_files (fsmonitor=disabled) 0.14(0.11+0.05) 0.14(0.10+0.05) +0.0% 7519.29: add (fsmonitor=disabled) 2.43(1.61+1.64) 2.43(1.69+1.57) +0.0% On linux (2.29.2 vs w/ this patch): nipunn@nipunn-dbx:~/src/server3$ strace -f -c git diff 2>&1 | grep lstat 0.04 0.000063 3 20 6 lstat nipunn@nipunn-dbx:~/src/server3$ strace -f -c git diff HEAD 2>&1 | grep lstat 94.98 5.242262 10 523783 13 lstat nipunn@nipunn-dbx:~/src/server3$ strace -f -c ../git/bin-wrappers/git diff 2>&1 | grep lstat 0.38 0.000032 5 7 3 lstat nipunn@nipunn-dbx:~/src/server3$ strace -f -c ../git/bin-wrappers/git diff HEAD 2>&1 | grep lstat 99.44 0.741892 9 81634 10 lstat On mac (2.29.2 vs w/ this patch): nipunn-mbp:server nipunn$ sudo dtruss -L -f -c git diff 2>&1 | grep "^lstat64 " lstat64 8 nipunn-mbp:server nipunn$ sudo dtruss -L -f -c git diff HEAD 2>&1 | grep "^lstat64 " lstat64 120242 nipunn-mbp:server nipunn$ sudo dtruss -L -f -c ../git/bin-wrappers/git diff 2>&1 | grep "^lstat64 " lstat64 4 nipunn-mbp:server nipunn$ sudo dtruss -L -f -c ../git/bin-wrappers/git diff HEAD 2>&1 | grep "^lstat64 " lstat64 4497 There are still a bunch of lstats - on directories, but not every file. Progress! Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 March 2021, 20:31:14 UTC
0ec9949 fsmonitor: add assertion that fsmonitor is valid to check_removed Validate that fsmonitor is valid to futureproof against bugs where check_removed might be called from places that haven't refreshed. Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 March 2021, 20:31:13 UTC
4f3d6d0 fsmonitor: skip lstat deletion check during git diff-index Teach git to honor fsmonitor rather than issuing an lstat when checking for dirty local deletes. Eliminates O(files) lstats during `git diff HEAD` Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 18 March 2021, 20:31:11 UTC
4abc578 fsmonitor: do not forget to release the token in `discard_index()` In 56c6910028a (fsmonitor: change last update timestamp on the index_state to opaque token, 2020-01-07), we forgot to adjust `discard_index()` to release the "last-update" token: it is no longer a 64-bit number, but a free-form string that has been allocated. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 19:19:28 UTC
3dfd305 fsmonitor: fix memory corruption in some corner cases In 56c6910028a (fsmonitor: change last update timestamp on the index_state to opaque token, 2020-01-07), we forgot to adjust the part of `unpack_trees()` that copies the FSMonitor "last-update" information that we copy from the source index to the result index since 679f2f9fdd2 (unpack-trees: skip stat on fsmonitor-valid files, 2019-11-20). Since the "last-update" information is no longer a 64-bit number, but a free-form string that has been allocated, we need to duplicate it rather than just copying it. This is important because there _are_ cases when `unpack_trees()` will perform a oneway merge that implicitly calls `refresh_fsmonitor()` (which will allocate that "last-update" token). This happens _after_ that token was copied into the result index. However, we _then_ call `check_updates()` on that index, which will _also_ call `refresh_fsmonitor()`, accessing the "last-update" string, which by now would be released already. In the instance that lead to this patch, this caused a segmentation fault during a lengthy, complicated rebase involving the todo command `reset` that (crucially) had to updated many files. Unfortunately, it seems very hard to trigger that crash, therefore this patch is not accompanied by a regression test. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 19:19:26 UTC
cfd409e config.txt: add missing period Signed-off-by: Kyle Meyer <kyle@kyleam.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 18:25:15 UTC
7730f85 bisect: peel annotated tags to commits This patch fixes a bug where git-bisect doesn't handle receiving annotated tags as "git bisect good <tag>", etc. It's a regression in 27257bc466 (bisect--helper: reimplement `bisect_state` & `bisect_head` shell functions in C, 2020-10-15). The original shell code called: sha=$(git rev-parse --verify "$rev^{commit}") || die "$(eval_gettext "Bad rev input: \$rev")" which will peel the input to a commit (or complain if that's not possible). But the C code just calls get_oid(), which will yield the oid of the tag. The fix is to peel to a commit. The error message here is a little non-idiomatic for Git (since it starts with a capital). I've mostly left it, as it matches the other converted messages (like the "Bad rev input" we print when get_oid() fails), though I did add an indication that it was the peeling that was the problem. It might be worth taking a pass through this converted code to modernize some of the error messages. Note also that the test does a bare "grep" (not i18ngrep) on the expected "X is the first bad commit" output message. This matches the rest of the test script. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 18:24:08 UTC
5f70859 t5606: run clone branch name test with protocol v2 4f37d45706 ("clone: respect remote unborn HEAD", 2021-02-05) introduces a new feature (if the remote has an unborn HEAD, e.g. when the remote repository is empty, use it as the name of the branch) that only works in protocol v2, but did not ensure that one of its tests always uses protocol v2, and thus that test would fail if GIT_TEST_PROTOCOL_VERSION=0 (or 1) is used. Therefore, add "-c protocol.version=2" to the appropriate test. (The rest of the tests from that commit have "-c protocol.version=2" already added.) Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 18:19:36 UTC
116affa mem-pool: drop trailing semicolon from macro definition Allow BLOCK_GROWTH_SIZE to be used like an integer literal by removing the trailing semicolon from its definition. Also wrap the expression in parentheses, to allow it to be used with operators without leading to unexpected results. It doesn't matter for the current use site, but make it follow standard macro rules anyway to avoid future surprises. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 17:20:16 UTC
3d8cbbf block-sha1: drop trailing semicolon from macro definition 23119ffb4e (block-sha1: put expanded macro parameters in parentheses, 2012-07-22) added a trailing semicolon to the definition of SHA_MIX without explanation. It doesn't matter with the current code, but make sure to avoid potential surprises by removing it again. This allows the macro to be used almost like a function: Users can combine it with operators of their choice, but still must not pass an expression with side-effects as a parameter, as it would be evaluated multiple times. Signed-off-by: René Scharfe <l.s.r@web.de> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 17:20:01 UTC
097ea2c fsmonitor: avoid global-buffer-overflow READ when checking trivial response query_result can be be an empty strbuf (STRBUF_INIT) - in that case trying to read 3 bytes triggers a buffer overflow read (as query_result.buf = '\0'). Therefore we need to check query_result's length before trying to read 3 bytes. This overflow was introduced in: 940b94f35c (fsmonitor: log invocation of FSMonitor hook to trace2, 2021-02-03) It was found when running the test-suite against ASAN, and can be most easily reproduced with the following command: make GIT_TEST_OPTS="-v" DEFAULT_TEST_TARGET="t7519-status-fsmonitor.sh" \ SANITIZE=address DEVELOPER=1 test ==2235==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000019e6e5e at pc 0x00000043745c bp 0x7fffd382c520 sp 0x7fffd382bcc8 READ of size 3 at 0x0000019e6e5e thread T0 #0 0x43745b in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) /home/abuild/rpmbuild/BUILD/llvm-11.0.0.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:842:7 #1 0x43786d in bcmp /home/abuild/rpmbuild/BUILD/llvm-11.0.0.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:887:10 #2 0x80b146 in fsmonitor_is_trivial_response /home/ahunt/oss-fuzz/git/fsmonitor.c:192:10 #3 0x80b146 in query_fsmonitor /home/ahunt/oss-fuzz/git/fsmonitor.c:175:7 #4 0x80a749 in refresh_fsmonitor /home/ahunt/oss-fuzz/git/fsmonitor.c:267:21 #5 0x80bad1 in tweak_fsmonitor /home/ahunt/oss-fuzz/git/fsmonitor.c:429:4 #6 0x90f040 in read_index_from /home/ahunt/oss-fuzz/git/read-cache.c:2321:3 #7 0x8e5d08 in repo_read_index_preload /home/ahunt/oss-fuzz/git/preload-index.c:164:15 #8 0x52dd45 in prepare_index /home/ahunt/oss-fuzz/git/builtin/commit.c:363:6 #9 0x52a188 in cmd_commit /home/ahunt/oss-fuzz/git/builtin/commit.c:1588:15 #10 0x4ce77e in run_builtin /home/ahunt/oss-fuzz/git/git.c:453:11 #11 0x4ccb18 in handle_builtin /home/ahunt/oss-fuzz/git/git.c:704:3 #12 0x4cb01c in run_argv /home/ahunt/oss-fuzz/git/git.c:771:4 #13 0x4cb01c in cmd_main /home/ahunt/oss-fuzz/git/git.c:902:19 #14 0x6aca8d in main /home/ahunt/oss-fuzz/git/common-main.c:52:11 #15 0x7fb027bf5349 in __libc_start_main (/lib64/libc.so.6+0x24349) #16 0x4206b9 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120 0x0000019e6e5e is located 2 bytes to the left of global variable 'strbuf_slopbuf' defined in 'strbuf.c:51:6' (0x19e6e60) of size 1 'strbuf_slopbuf' is ascii string '' 0x0000019e6e5e is located 126 bytes to the right of global variable 'signals' defined in 'sigchain.c:11:31' (0x19e6be0) of size 512 SUMMARY: AddressSanitizer: global-buffer-overflow /home/abuild/rpmbuild/BUILD/llvm-11.0.0.src/build/../projects/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:842:7 in MemcmpInterceptorCommon(void*, int (*)(void const*, void const*, unsigned long), void const*, void const*, unsigned long) Shadow bytes around the buggy address: 0x000080334d70: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x000080334d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080334d90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080334da0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080334db0: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 =>0x000080334dc0: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9[f9]01 f9 f9 f9 0x000080334dd0: f9 f9 f9 f9 03 f9 f9 f9 f9 f9 f9 f9 02 f9 f9 f9 0x000080334de0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9 0x000080334df0: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x000080334e00: f9 f9 f9 f9 00 00 00 00 f9 f9 f9 f9 01 f9 f9 f9 0x000080334e10: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc Signed-off-by: Andrzej Hunt <ajrhunt@google.com> Acked-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 17 March 2021, 17:00:20 UTC
1c57cc7 cocci: allow xcalloc(1, size) Allocating a pre-cleared single element is quite common and it is misleading to use CALLOC_ARRAY(); these allocations that would be affected without this change are not allocating an array. Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 March 2021, 00:56:07 UTC
486f4bd xcalloc: use CALLOC_ARRAY() when applicable These are for codebase before Git 2.31 Signed-off-by: Junio C Hamano <gitster@pobox.com> 16 March 2021, 00:51:10 UTC
00ea64e doc/git-commit: add documentation for fixup=[amend|reword] options Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 21:29:36 UTC
8bedae4 t3437: use --fixup with options to create amend! commit We taught `git commit --fixup` to create "amend!" commit. Let's also update the tests and use it to setup the rebase tests. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 21:29:36 UTC
3d1bda6 t7500: add tests for --fixup=[amend|reword] options Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 21:29:35 UTC
3270ae8 commit: add a reword suboption to --fixup `git commit --fixup=reword:<commit>` aliases `--fixup=amend:<commit> --only`, where it creates an empty "amend!" commit that will reword <commit> without changing its contents when it is rebased with `--autosquash`. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 21:29:35 UTC
494d314 commit: add amend suboption to --fixup to create amend! commit `git commit --fixup=amend:<commit>` will create an "amend!" commit. The resulting commit message subject will be "amend! ..." where "..." is the subject line of <commit> and the initial message body will be <commit>'s message. The "amend!" commit when rebased with --autosquash will fixup the contents and replace the commit message of <commit> with the "amend!" commit's message body. In order to prevent rebase from creating commits with an empty message we refuse to create an "amend!" commit if commit message body is empty. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 21:29:35 UTC
6e0e288 sequencer: export and rename subject_length() This function can be used in other parts of git. Let's move the function to commit.c and also rename it to make the name of the function more generic. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 21:29:35 UTC
a5828ae Git 2.31 Signed-off-by: Junio C Hamano <gitster@pobox.com> 15 March 2021, 18:51:51 UTC
8775279 Merge branch 'jn/mergetool-hideresolved-is-optional' Disable the recent mergetool's hideresolved feature by default for backward compatibility and safety. * jn/mergetool-hideresolved-is-optional: doc: describe mergetool configuration in git-mergetool(1) mergetool: do not enable hideResolved by default 14 March 2021, 23:01:41 UTC
074d162 Merge branch 'tb/pack-revindex-on-disk' Fix for a topic in 'master'. * tb/pack-revindex-on-disk: pack-revindex.c: don't close unopened file descriptors 14 March 2021, 23:01:41 UTC
5be1c70 Merge tag 'l10n-2.31.0-rnd2' of git://github.com/git-l10n/git-po l10n for Git 2.31.0 round 2 * tag 'l10n-2.31.0-rnd2' of git://github.com/git-l10n/git-po: l10n: zh_CN: for git v2.31.0 l10n round 1 and 2 l10n: de.po: Update German translation for Git v2.31.0 l10n: pt_PT: add Portuguese translations part 1 l10n: vi.po(5104t): for git v2.31.0 l10n round 2 l10n: es: 2.31.0 round 2 l10n: Add translation team info l10n: start Indonesian translation l10n: zh_TW.po: v2.31.0 round 2 (15 untranslated) l10n: bg.po: Updated Bulgarian translation (5104t) l10n: fr: v2.31 rnd 2 l10n: tr: v2.31.0-rc1 l10n: sv.po: Update Swedish translation (5104t0f0u) l10n: git.pot: v2.31.0 round 2 (9 new, 8 removed) l10n: tr: v2.31.0-rc0 l10n: sv.po: Update Swedish translation (5103t0f0u) l10n: pl.po: Update translation l10n: fr: v2.31.0 rnd 1 l10n: git.pot: v2.31.0 round 1 (155 new, 89 removed) l10n: Update Catalan translation l10n: ru.po: update Russian translation 14 March 2021, 22:50:36 UTC
8588aa8 vcs-svn: remove header files as well fc47391e24 (drop vcs-svn experiment, 2020-08-13) removed most vcs-svn files. Drop the remaining header files as well, as they are no longer used. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 March 2021, 22:48:23 UTC
473eb54 l10n: zh_CN: for git v2.31.0 l10n round 1 and 2 Translate 161 new messages (5104t0f0u) for git 2.31.0. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> 14 March 2021, 16:05:25 UTC
4bc948a Merge branch 'master' of github.com:vnwildman/git * 'master' of github.com:vnwildman/git: l10n: vi.po(5104t): for git v2.31.0 l10n round 2 14 March 2021, 16:04:47 UTC
e196890 Merge branch 'l10n/zh_TW/210301' of github.com:l10n-tw/git-po * 'l10n/zh_TW/210301' of github.com:l10n-tw/git-po: l10n: zh_TW.po: v2.31.0 round 2 (15 untranslated) 14 March 2021, 14:35:44 UTC
84bc814 Merge branch 'po-id' of github.com:bagasme/git-po * 'po-id' of github.com:bagasme/git-po: l10n: Add translation team info l10n: start Indonesian translation 14 March 2021, 14:35:17 UTC
bd5fba8 Merge branch 'master' of github.com:Softcatala/git-po * 'master' of github.com:Softcatala/git-po: l10n: Update Catalan translation 14 March 2021, 14:34:46 UTC
2d89752 Merge branch 'russian-l10n' of github.com:DJm00n/git-po-ru * 'russian-l10n' of github.com:DJm00n/git-po-ru: l10n: ru.po: update Russian translation 14 March 2021, 14:34:12 UTC
799df2e Merge branch 'pt-PT' of github.com:git-l10n-pt-PT/git-po * 'pt-PT' of github.com:git-l10n-pt-PT/git-po: l10n: pt_PT: add Portuguese translations part 1 14 March 2021, 14:33:26 UTC
ca56dad use CALLOC_ARRAY Add and apply a semantic patch for converting code that open-codes CALLOC_ARRAY to use it instead. It shortens the code and infers the element size automatically. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 14 March 2021, 00:00:09 UTC
f112149 git-compat-util.h: drop trailing semicolon from macro definition Make CALLOC_ARRAY usable like a function by requiring callers to supply the trailing semicolon, which all of the current ones already do. With the extra semicolon e.g. the following code wouldn't compile because it disconnects the "else" from the "if": if (condition) CALLOC_ARRAY(ptr, n); else whatever(); Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 March 2021, 23:56:13 UTC
4c8e3dc Documentation/git-push.txt: correct configuration typo In the EXAMPLES section, git-push(1) says that 'git push origin' pushes the current branch to the value of the 'remote.origin.merge' configuration. This wording (which dates back to b2ed944af7 (push: switch default from "matching" to "simple", 2013-01-04)) is incorrect. There is no such configuration as 'remote.<name>.merge'. This likely was originally intended to read "branch.<name>.merge" instead. Indeed, when 'push.default' is 'simple' (which is the default value, and is applicable in this scenario per "without additional configuration"), setup_push_upstream() dies if the branch's local name does not match 'branch.<name>.merge'. Correct this long-standing typo to resolve some recent confusion on the intended behavior of this example. Reported-by: Adam Sharafeddine <adam.shrfdn@gmail.com> Reported-by: Fabien Terrani <terranifabien@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 March 2021, 23:41:45 UTC
5320406 doc: describe mergetool configuration in git-mergetool(1) In particular, this describes mergetool.hideResolved, which can help users discover this setting (either because it may be useful to them or in order to understand mergetool's behavior if they have forgotten setting it in the past). Tested by running make -C Documentation git-mergetool.1 man Documentation/git-mergetool.1 and reading through the page. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 March 2021, 23:34:32 UTC
b2a51c1 mergetool: do not enable hideResolved by default When 98ea309b3f (mergetool: add hideResolved configuration, 2021-02-09) introduced the mergetool.hideResolved setting to reduce the clutter in viewing non-conflicted sections of files in a mergetool, it enabled it by default, explaining: No adverse effects were noted in a small survey of popular mergetools[1] so this behavior defaults to `true`. In practice, alas, adverse effects do appear. A few issues: 1. No indication is shown in the UI that the base, local, and remote versions shown have been modified by additional resolution. This is inherent in the design: the idea of mergetool.hideResolved is to convince a mergetool that expects pristine local, base, and remote files to show partially resolved verisons of those files instead; there is no additional source of information accessible to the mergetool to see where the resolution has happened. (By contrast, a mergetool generating the partial resolution from conflict markers for itself would be able to hilight the resolved sections with a different color.) A user accustomed to seeing the files without partial resolution gets no indication that this behavior has changed when they upgrade Git. 2. If the computed merge did not line up the files correctly (for example due to repeated sections in the file), the partially resolved files can be misleading and do not have enough information to reconstruct what happened and compute the correct merge result. 3. Resolving a conflict can involve information beyond the textual conflict. For example, if the local and remote versions added overlapping functionality in different ways, seeing the full unresolved versions of each alongside the base gives information about each side's intent that makes it possible to come up with a resolution that combines those two intents. By contrast, when starting with partially resolved versions of those files, one can produce a subtly wrong resolution that includes redundant extra code added by one side that is not needed in the approach taken on the other. All that said, a user wanting to focus on textual conflicts with reduced clutter can still benefit from mergetool.hideResolved=true as a way to deemphasize sections of the code that resolve cleanly without requiring any changes to the invoked mergetool. The caveats described above are reduced when the user has explicitly turned this on, because then the user is aware of them. Flip the default to 'false'. Reported-by: Dana Dahlstrom <dahlstrom@google.com> Helped-by: Seth House <seth@eseth.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 13 March 2021, 23:30:29 UTC
a4a4439 http: drop the check for an empty proxy password before approving credential_approve() already checks for a non-empty password before saving, so there's no need to do the extra check here. Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 March 2021, 06:17:10 UTC
cd27f60 http: store credential when PKI auth is used We already looked for the PKI credentials in the credential store, but failed to approve it on success. Meaning, the PKI certificate password was never stored and git would request it on every connection to the remote. Let's complete the chain by storing the certificate password on success. Likewise, we also need to reject the credential when there is a failure. Curl appears to report client-related certificate issues are reported with the CURLE_SSL_CERTPROBLEM error. This includes not only a bad password, but potentially other client certificate related problems. Since we cannot get more information from curl, we'll go ahead and reject the credential upon receiving that error, just to be safe and avoid caching or saving a bad password. Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 12 March 2021, 06:17:07 UTC
9609972 archive: expand only a single %(describe) per archive Every %(describe) placeholder in $Format:...$ strings in files with the attribute export-subst is expanded by calling git describe. This can potentially result in a lot of such calls per archive. That's OK for local repositories under control of the user of git archive, but could be a problem for hosted repositories. Expand only a single %(describe) placeholder per archive for now to avoid denial-of-service attacks. We can make this limit configurable later if needed, but let's start out simple. Reported-by: Jeff King <peff@peff.net> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 11 March 2021, 21:22:44 UTC
7555567 builtin/init-db: handle bare clones when core.bare set to false In 552955ed7f ("clone: use more conventional config/option layering", 2020-10-01), clone learned to read configuration options earlier in its execution, before creating the new repository. However, that led to a problem: if the core.bare setting is set to false in the global config, cloning a bare repository segfaults. This happens because the repository is falsely thought to be non-bare, but clone has set the work tree to NULL, which is then dereferenced. The code to initialize the repository already considers the fact that a user might want to override the --bare option for git init, but it doesn't take into account clone, which uses a different option. Let's just check that the work tree is not NULL, since that's how clone indicates that the repository is bare. This is also the case for git init, so we won't be regressing that case. Reported-by: Joseph Vusich <jvusich@amazon.com> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 March 2021, 23:06:48 UTC
42efa12 filter-branch: drop $_x40 glob When checking whether a commit was rewritten to a single object id, we use a glob that insists on a 40-hex result. This works for sha1, but fails t7003 when run with GIT_TEST_DEFAULT_HASH=sha256. Since the previous commit simplified the case statement here, we only have two arms: an empty string or a single object id. We can just loosen our glob to match anything, and still distinguish those cases (we lose the ability to notice bogus input, but that's not a problem; we are the one who wrote the map in the first place, and anyway update-ref will complain loudly if the input isn't a valid hash). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 March 2021, 22:16:58 UTC
98fe9e6 filter-branch: drop multiple-ancestor warning When a ref maps to a commit that is neither rewritten nor kept by filter-branch (e.g., because it was eliminated by rev-list's pathspec selection), we rewrite it to its nearest ancestor. Since the initial commit in 6f6826c52b (Add git-filter-branch, 2007-06-03), we have warned when there are multiple such ancestors in the map file. However, the warning code is impossible to trigger these days. Since a0e46390d3 (filter-branch: fix ref rewriting with --subdirectory-filter, 2008-08-12), we find the ancestor using "rev-list -1", so it can only ever have a single value. This code is made doubly confusing by the fact that we append to the map file when mapping ancestors. However, this can never yield multiple values because: - we explicitly check whether the map already exists, and if so, do nothing (so our "append" will always be to a file that does not exist) - even if we were to try mapping twice, the process to do so is deterministic. I.e., we'd always end up with the same ancestor for a given sha1. So warning about it would be pointless; there is no ambiguity. So swap out the warning code for a BUG (which we'll simplify further in the next commit). And let's stop using the append operator to make the ancestor-mapping code less confusing. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 March 2021, 22:14:52 UTC
6d875d1 t7003: test ref rewriting explicitly After it has rewritten all of the commits, filter-branch will then rewrite each of the input refs based on the resulting map of old/new commits. But we don't have any explicit test coverage of this code. Let's make sure we are covering each of those cases: - deleting a ref when all of its commits were pruned - rewriting a ref based on the mapping (this happens throughout the script, but let's make sure we generate the correct messages) - rewriting a ref whose tip was excluded, in which case we rewrite to the nearest ancestor. Note in this case that we still insist that no "warning" line is present (even though it looks like we'd trigger the "... was rewritten into multiple commits" one). See the next commit for more details. Note these all pass currently, but the latter two will fail when run with GIT_TEST_DEFAULT_HASH=sha256. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 10 March 2021, 22:14:19 UTC
13d7ab6 Git 2.31-rc2 09 March 2021, 00:09:43 UTC
56a5765 Sync with Git 2.30.2 for CVE-2021-21300 Signed-off-by: Junio C Hamano <gitster@pobox.com> 09 March 2021, 00:09:07 UTC
6c46f86 Merge branch 'jt/transfer-fsck-across-packs-fix' The code to fsck objects received across multiple packs during a single git fetch session has been broken when the packfile URI feature was in use. A workaround has been added by disabling the codepath to avoid keeping a packfile that is too small. * jt/transfer-fsck-across-packs-fix: fetch-pack: do not mix --pack_header and packfile uri 09 March 2021, 00:04:47 UTC
8348451 l10n: de.po: Update German translation for Git v2.31.0 Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com> Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com> Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com> 08 March 2021, 18:49:33 UTC
68b5c3a Makefile: update 'make fuzz-all' docs to reflect modern clang Clang no longer produces a libFuzzer.a. Instead, you can include libFuzzer by using -fsanitize=fuzzer. Therefore we should use that in the example command for building fuzzers. We also add -fsanitize=fuzzer-no-link to the CFLAGS to ensure that all the required instrumentation is added when compiling git [1], and remove -fsanitize-coverage=trace-pc-guard as it is deprecated. I happen to have tested with LLVM 11 - however -fsanitize=fuzzer appears to work in a wide range of reasonably modern clangs. (On my system: what used to be libFuzzer.a now lives under the following path, which is tricky albeit not impossible for a novice such as myself to find: /usr/lib64/clang/11.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a ) [1] https://releases.llvm.org/11.0.0/docs/LibFuzzer.html#fuzzer-usage Signed-off-by: Andrzej Hunt <ajrhunt@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 March 2021, 18:26:25 UTC
e8df3b6 Add entry for Ramkumar Ramachandra Signed-off-by: Ramkumar Ramachandra <r@artagnon.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 March 2021, 17:56:34 UTC
241b5d3 fix xcalloc() argument order Pass the number of elements first and ther size second, as expected by xcalloc(). Provide a semantic patch, which was actually used to generate the rest of this patch. The semantic patch would generate flip-flop diffs if both arguments are sizeofs. We don't have such a case, and it's hard to imagine the usefulness of such an allocation. If it ever occurs then we could deal with it by duplicating the rule in the semantic patch to make it cancel itself out, or we could change the code to use CALLOC_ARRAY. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 08 March 2021, 17:45:04 UTC
408985d l10n: pt_PT: add Portuguese translations part 1 * Newlines corrected. * Add concept translation table. * Translated some. * Corrected some. * Corrected some 'Negation of Emptiness'. Signed-off-by: Daniel Santos <hello@brighterdan.com> 08 March 2021, 15:21:51 UTC
1369935 l10n: vi.po(5104t): for git v2.31.0 l10n round 2 Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com> 08 March 2021, 02:03:04 UTC
b0adcc3 l10n: es: 2.31.0 round 2 Signed-off-by: Christopher Diaz Riveros <christopher.diaz.riv@gmail.com> 07 March 2021, 23:31:14 UTC
c21ad4d l10n: Add translation team info Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> 07 March 2021, 12:38:29 UTC
8c4abfb l10n: start Indonesian translation * Initialize PO file * Translate init-db.c * Translate wt-status.c * Translate builtin/clone.c * Translate builtin/checkout.c * Translate builtin/fetch.c * Complete core translations: * builtin/remote.c * builtin/index-pack.c * push.c * reset.c * Sync with l10n upstream Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> 07 March 2021, 12:38:07 UTC
back to top