summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-03-30Merge branch 'ab/read-tree'Libravatar Junio C Hamano11-147/+205
Code simplification by removing support for a caller that is long gone. * ab/read-tree: tree.h API: simplify read_tree_recursive() signature tree.h API: expose read_tree_1() as read_tree_at() archive: stop passing "stage" through read_tree_recursive() ls-files: refactor away read_tree() ls-files: don't needlessly pass around stage variable tree.c API: move read_tree() into builtin/ls-files.c ls-files tests: add meaningful --with-tree tests show tests: add test for "git show <tree>"
2021-03-30Merge branch 'bs/asciidoctor-installation-hints'Libravatar Junio C Hamano1-1/+3
Doc update. * bs/asciidoctor-installation-hints: INSTALL: note on using Asciidoctor to build doc
2021-03-30Merge branch 'mt/checkout-remove-nofollow'Libravatar Junio C Hamano5-33/+39
When "git checkout" removes a path that does not exist in the commit it is checking out, it wasn't careful enough not to follow symbolic links, which has been corrected. * mt/checkout-remove-nofollow: checkout: don't follow symlinks when removing entries symlinks: update comment on threaded_check_leading_path()
2021-03-26Sync with v2.31.1Libravatar Junio C Hamano1-0/+27
2021-03-26The fourth batchLibravatar Junio C Hamano1-1/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-26Merge branch 'cm/rebase-i-fixup-amend-reword'Libravatar Junio C Hamano8-68/+342
"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()
2021-03-26Merge branch 'cm/rebase-i-updates'Libravatar Junio C Hamano5-76/+87
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
2021-03-26Merge branch 'cm/rebase-i'Libravatar Junio C Hamano9-61/+587
"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
2021-03-26Merge branch 'js/http-pki-credential-store'Libravatar Junio C Hamano1-2/+11
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
2021-03-26Merge branch 'ab/make-cleanup'Libravatar Junio C Hamano1-5/+26
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
2021-03-26Git 2.31.1Libravatar Junio C Hamano3-2/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-24The third patchLibravatar Junio C Hamano1-0/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-24Merge branch 'nk/diff-index-fsmonitor'Libravatar Junio C Hamano4-10/+32
"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
2021-03-24Merge branch 'jk/fail-prereq-testfix'Libravatar Junio C Hamano2-3/+6
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
2021-03-24Merge branch 'tb/geometric-repack'Libravatar Junio C Hamano13-60/+1029
"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()'
2021-03-24Merge branch 'tb/push-simple-uses-branch-merge-config'Libravatar Junio C Hamano1-1/+1
Doc update. * tb/push-simple-uses-branch-merge-config: Documentation/git-push.txt: correct configuration typo
2021-03-22The second batchLibravatar Junio C Hamano1-2/+50
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-22Merge branch 'bc/clone-bare-with-conflicting-config'Libravatar Junio C Hamano2-2/+10
"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
2021-03-22Merge branch 'jk/filter-branch-sha256'Libravatar Junio C Hamano2-14/+33
Code clean-up. * jk/filter-branch-sha256: filter-branch: drop $_x40 glob filter-branch: drop multiple-ancestor warning t7003: test ref rewriting explicitly
2021-03-22Merge branch 'ps/update-ref-trans-hook-doc'Libravatar Junio C Hamano1-12/+21
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
2021-03-22Merge branch 'rr/mailmap-entry-self'Libravatar Junio C Hamano1-0/+1
* rr/mailmap-entry-self: Add entry for Ramkumar Ramachandra
2021-03-22Merge branch 'jr/doc-ignore-typofix'Libravatar Junio C Hamano1-1/+1
Doc cleanup. * jr/doc-ignore-typofix: doc: .gitignore documentation typofix
2021-03-22Merge branch 'sv/t9801-test-path-is-file-cleanup'Libravatar Junio C Hamano1-19/+19
Test cleanup. * sv/t9801-test-path-is-file-cleanup: t9801: replace test -f with test_path_is_file
2021-03-22Merge branch 'dl/cat-file-doc-cleanup'Libravatar Junio C Hamano1-33/+34
Doc cleanup. * dl/cat-file-doc-cleanup: git-cat-file.txt: remove references to "sha1" git-cat-file.txt: monospace args, placeholders and filenames
2021-03-22Merge branch 'rs/pretty-describe'Libravatar Junio C Hamano8-7/+145
"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)
2021-03-22Merge branch 'dl/stash-show-untracked'Libravatar Junio C Hamano7-9/+214
"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
2021-03-22Merge branch 'en/ort-perf-batch-8'Libravatar Junio C Hamano4-153/+449
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
2021-03-22Merge branch 'ab/grep-pcre2-allocfix'Libravatar Junio C Hamano3-58/+51
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
2021-03-22Merge branch 'jk/perf-in-worktrees'Libravatar Junio C Hamano1-9/+22
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
2021-03-22Merge branch 'ds/commit-graph-generation-config'Libravatar Junio C Hamano7-19/+30
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
2021-03-22Merge branch 'ab/remote-write-config-in-camel-case'Libravatar Junio C Hamano3-2/+6
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
2021-03-22Merge branch 'mt/cleanly-die-upon-missing-required-filter'Libravatar Junio C Hamano2-1/+24
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
2021-03-22Merge branch 'jk/open-dotgitx-with-nofollow'Libravatar Junio C Hamano10-41/+197
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
2021-03-20tree.h API: simplify read_tree_recursive() signatureLibravatar Ævar Arnfjörð Bjarmason8-45/+39
Simplify the signature of read_tree_recursive() to omit the "base", "baselen" and "stage" arguments. No callers of it use these parameters for anything anymore. The last function to call read_tree_recursive() with a non-"" path was read_tree_recursive() itself, but that was changed in ffd31f661d5 (Reimplement read_tree_recursive() using tree_entry_interesting(), 2011-03-25). The last user of the "stage" parameter went away in the last commit, and even that use was mere boilerplate. So let's remove those and rename the read_tree_recursive() function to just read_tree(). We had another read_tree() function that I've refactored away in preceding commits, since all in-tree users read trees recursively with a callback we can change the name to signify that this is the norm. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20tree.h API: expose read_tree_1() as read_tree_at()Libravatar Ævar Arnfjörð Bjarmason2-8/+15
Rename the static read_tree_1() function to read_tree_at(). This function works just like read_tree_recursive(), except you provide your own strbuf. This step doesn't make much sense now, but in follow-up commits I'll remove the base/baselen/stage arguments to read_tree_recursive(). At that point an anticipated in-tree user[1] for the old read_tree_recursive() couldn't provide a path to start the traversal. Let's give them a function to do so with an API that makes more sense for them, by taking a strbuf we should be able to avoid more casting and/or reallocations in the future. 1. https://lore.kernel.org/git/xmqqft106sok.fsf@gitster.g Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20archive: stop passing "stage" through read_tree_recursive()Libravatar Ævar Arnfjörð Bjarmason1-9/+7
The "stage" variable being passed around in the archive code has only ever been an elaborate way to hardcode the value "0". This code was added in its original form in e4fbbfe9ecc (Add git-zip-tree, 2006-08-26), at which point a hardcoded "0" would be passed down through read_tree_recursive() to write_zip_entry(). It was then diligently added to the "struct directory" in ed22b4173bd (archive: support filtering paths with glob, 2014-09-21), but we were still not doing anything except passing it around as-is. Let's stop doing that in the code internal to archive.c, we'll still feed "0" to read_tree_recursive() itself, but won't use it. That we're providing it at all to read_tree_recursive() will be changed in a follow-up commit. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20ls-files: refactor away read_tree()Libravatar Ævar Arnfjörð Bjarmason1-43/+34
Refactor away the read_tree() function into its only user, overlay_tree_on_index(). First, change read_one_entry_opt() to use the strbuf parameter read_tree_recursive() passes down in place. This finishes up a partial refactoring started in 6a0b0b6de99 (tree.c: update read_tree_recursive callback to pass strbuf as base, 2014-11-30). Moving the rest into overlay_tree_on_index() makes this index juggling we're doing easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20ls-files: don't needlessly pass around stage variableLibravatar Ævar Arnfjörð Bjarmason1-17/+8
Now that read_tree() has been moved to ls-files.c we can get rid of the stage != 1 case that'll never happen. Let's not use read_tree_recursive() as a pass-through to pass "stage = 1" either. For now we'll pass an unused "stage = 0" for consistency with other read_tree_recursive() callers, that argument will be removed in a follow-up commit. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20tree.c API: move read_tree() into builtin/ls-files.cLibravatar Ævar Arnfjörð Bjarmason4-95/+92
Since the read_tree() API was added around the same time as read_tree_recursive() in 94537c78a82 (Move "read_tree()" to "tree.c"[...], 2005-04-22) and b12ec373b8e ([PATCH] Teach read-tree about commit objects, 2005-04-20) things have gradually migrated over to the read_tree_recursive() version. Now builtin/ls-files.c is the last user of this code, let's move all the relevant code there. This allows for subsequent simplification of it, and an eventual move to read_tree_recursive(). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20ls-files tests: add meaningful --with-tree testsLibravatar Ævar Arnfjörð Bjarmason1-0/+41
Add tests for "ls-files --with-tree". There was effectively no coverage for any normal usage of this command, only the tests added in 54e1abce90e (Add test case for ls-files --with-tree, 2007-10-03) for an obscure bug. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-20show tests: add test for "git show <tree>"Libravatar Ævar Arnfjörð Bjarmason1-0/+39
Add missing tests for showing a tree with "git show". Let's test for showing a tree, two trees, and that doing so doesn't recurse. The only tests for this code added in 5d7eeee2ac6 (git-show: grok blobs, trees and tags, too, 2006-12-14) were the tests in t7701-repack-unpack-unreachable.sh added in ccc1297226b (repack: modify behavior of -A option to leave unreferenced objects unpacked, 2008-05-09). Let's add this common mode of operation to the "show" tests themselves. It's more obvious, and the tests in t7701-repack-unpack-unreachable.sh happily pass if we start buggily emitting trees recursively. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-19Merge branch 'tb/git-mv-icase-fix'Libravatar Junio C Hamano1-1/+1
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
2021-03-19The first batch in 2.32 cycleLibravatar Junio C Hamano3-2/+53
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-03-19Merge branch 'rs/xcalloc-takes-nelem-first'Libravatar Junio C Hamano4-6/+17
Code cleanup. * rs/xcalloc-takes-nelem-first: fix xcalloc() argument order
2021-03-19Merge branch 'ah/make-fuzz-all-doc-update'Libravatar Junio C Hamano1-3/+3
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
2021-03-19Merge branch 'jk/slimmed-down'Libravatar Junio C Hamano5-102/+0
Unused code removal. * jk/slimmed-down: vcs-svn: remove header files as well
2021-03-19Merge branch 'rs/calloc-array'Libravatar Junio C Hamano89-189/+191
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
2021-03-19Merge branch 'rs/avoid-null-statement-after-macro-call'Libravatar Junio C Hamano2-2/+2
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
2021-03-19Merge branch 'km/config-doc-typofix'Libravatar Junio C Hamano1-1/+1
Docfix. * km/config-doc-typofix: config.txt: add missing period
2021-03-19Merge branch 'jt/clone-unborn-head'Libravatar Junio C Hamano1-1/+1
Test fix. * jt/clone-unborn-head: t5606: run clone branch name test with protocol v2