summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-08Merge branch 'js/trace2-session-id'Libravatar Junio C Hamano12-3/+198
The transport layer was taught to optionally exchange the session ID assigned by the trace2 subsystem during fetch/push transactions. * js/trace2-session-id: receive-pack: log received client session ID send-pack: advertise session ID in capabilities upload-pack, serve: log received client session ID fetch-pack: advertise session ID in capabilities transport: log received server session ID serve: advertise session ID in v2 capabilities receive-pack: advertise session ID in v0 capabilities upload-pack: advertise session ID in v0 capabilities trace2: add a public function for getting the SID docs: new transfer.advertiseSID option docs: new capability to advertise session IDs
2020-12-08Merge branch 'mt/do-not-use-scld-in-working-tree'Libravatar Junio C Hamano5-6/+47
"git apply" adjusted the permission bits of working-tree files and directories according core.sharedRepository setting by mistake and for a long time, which has been corrected. * mt/do-not-use-scld-in-working-tree: apply: don't use core.sharedRepository to create working tree files
2020-12-08Merge branch 'ds/maintenance-part-2'Libravatar Junio C Hamano1-2/+4
Test fix. * ds/maintenance-part-2: t7900: speed up expensive test
2020-12-08Merge branch 'ds/maintenance-part-1'Libravatar Junio C Hamano1-0/+1
Build consistency fix. * ds/maintenance-part-1: Makefile: mark git-maintenance as a builtin
2020-12-08Merge branch 'ds/maintenance-part-3'Libravatar Junio C Hamano2-2/+15
"git maintenance" command had trouble working in a directory whose pathname contained an ERE metacharacter like '+'. * ds/maintenance-part-3: maintenance: use 'git config --fixed-value'
2020-12-08Merge branch 'ds/config-literal-value'Libravatar Junio C Hamano7-76/+312
Various subcommands of "git config" that takes value_regex learn the "--literal-value" option to take the value_regex option as a literal string. * ds/config-literal-value: config doc: value-pattern is not necessarily a regexp config: implement --fixed-value with --get* config: plumb --fixed-value into config API config: add --fixed-value option, un-implemented t1300: add test for --replace-all with value-pattern t1300: test "set all" mode with value-pattern config: replace 'value_regex' with 'value_pattern' config: convert multi_replace to flags
2020-12-08Merge branch 'tb/idx-midx-race-fix'Libravatar Junio C Hamano3-20/+31
Processes that access packdata while the .idx file gets removed (e.g. while repacking) did not fail or fall back gracefully as they could. * tb/idx-midx-race-fix: midx.c: protect against disappearing packs packfile.c: protect against disappearing indexes
2020-12-08Merge branch 'ps/update-ref-multi-transaction'Libravatar Junio C Hamano4-50/+126
"git update-ref --stdin" learns to take multiple transactions in a single session. * ps/update-ref-multi-transaction: update-ref: disallow "start" for ongoing transactions p1400: use `git-update-ref --stdin` to test multiple transactions update-ref: allow creation of multiple transactions t1400: avoid touching refs on filesystem
2020-12-08Merge branch 'js/add-i-color-fix'Libravatar Junio C Hamano4-32/+127
"git add -i" failed to honor custom colors configured to show patches, which has been corrected. * js/add-i-color-fix: add -i: verify in the tests that colors can be overridden add -p: prefer color.diff.context over color.diff.plain add -i (Perl version): color header to match the C version add -i (built-in): use the same indentation as the Perl version add -p (built-in): do not color the progress indicator separately add -i (built-in): use correct names to load color.diff.* config add -i (built-in): prevent the `reset` "color" from being configured add -i: use `reset_color` consistently add -p (built-in): imitate `xdl_format_hunk_hdr()` generating hunk headers add -i (built-in): send error messages to stderr add -i (built-in): do show an error message for incorrect inputs
2020-12-08Merge branch 'jt/trace-error-on-warning'Libravatar Junio C Hamano2-1/+7
Like die() and error(), a call to warning() will also trigger a trace2 event. * jt/trace-error-on-warning: usage: add trace2 entry upon warning()
2020-12-03Tenth batchLibravatar Junio C Hamano1-5/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-03Merge branch 'pk/subsub-fetch-fix'Libravatar Junio C Hamano2-67/+10
An earlier attempt to fix "git fetch --recurse-submodules" broke another use case; revert it until a better fix is found. * pk/subsub-fetch-fix: Revert "submodules: fix of regression on fetching of non-init subsub-repo"
2020-12-03Merge branch 'jk/stop-pack-objects-when-fetch-is-killed'Libravatar Junio C Hamano1-0/+1
"git fetch" that is killed may leave a pack-objects process behind, still computing to find a good compression, wasting cycles. This has been corrected. * jk/stop-pack-objects-when-fetch-is-killed: upload-pack: kill pack-objects helper on signal or exit
2020-12-03Merge branch 'jk/stop-pack-objects-when-push-is-killed'Libravatar Junio C Hamano1-0/+1
"git push" that is killed may leave a pack-objects process behind, still computing to find a good compression, wasting cycles. This has been corrected. * jk/stop-pack-objects-when-push-is-killed: send-pack: kill pack-objects helper on signal or exit
2020-12-03Merge branch 'tb/repack-simplify'Libravatar Junio C Hamano1-99/+54
Simplify the logic to deal with a repack operation that ended up creating the same packfile. * tb/repack-simplify: builtin/repack.c: don't move existing packs out of the way builtin/repack.c: keep track of what pack-objects wrote repack: make "exts" array available outside cmd_repack()
2020-12-03Merge branch 'pb/pull-rebase-recurse-submodules'Libravatar Junio C Hamano2-14/+90
"git pull --rebase --recurse-submodules" checked for local changes in a wrong range and failed to run correctly when it should. * pb/pull-rebase-recurse-submodules: pull: check for local submodule modifications with the right range t5572: describe '--rebase' tests a little more t5572: add notes on a peculiar test pull --rebase: compute rebase arguments in separate function
2020-12-03Merge branch 'ab/retire-parse-remote'Libravatar Junio C Hamano6-138/+11
"git-parse-remote" shell script library outlived its usefulness. * ab/retire-parse-remote: submodule: fix fetch_in_submodule logic parse-remote: remove this now-unused library submodule: remove sh function in favor of helper submodule: use "fetch" logic instead of custom remote discovery
2020-12-02Revert "submodules: fix of regression on fetching of non-init subsub-repo"Libravatar Junio C Hamano2-67/+10
This reverts commit 1b7ac4e6d4d490b224f5206af7418ed74e490608; in <CAN0XMOLiS_8JZKF_wW70BvRRxkDHyUoa=Z3ODtB_Bd6f5Y=7JQ@mail.gmail.com>, Ralf Thielow reports that "git fetch" with submodule.recurse set can result in a bogus and infinitely recursive fetching of the same submodule.
2020-12-02Makefile: mark git-maintenance as a builtinLibravatar Jeff King1-0/+1
We normally get the list of builtin commands by expanding BUILTIN_OBJS. But for commands which are embedded inside another's source file (e.g., cmd_show() in builtin/log.c), the Makefile needs to be told explicitly about them. Since cmd_maintenance() is inside buitin/gc.c, it should be listed explicitly in the BUILT_INS list in the Makefile. Not doing so isn't _too_ tragic, as it simply means we will not make a git-maintenance symlink in libexec/git-core. Since we encourage people to use the "git foo" form, even in scripts which have put libexec into their PATH, nobody seems to have noticed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-02apply: don't use core.sharedRepository to create working tree filesLibravatar Matheus Tavares5-6/+47
core.sharedRepository defines which permissions Git should set when creating files in $GIT_DIR, so that the repository may be shared with other users. But (in its current form) the setting shouldn't affect how files are created in the working tree. This is not respected by apply and am (which uses apply), when creating leading directories: $ cat d.patch diff --git a/d/f b/d/f new file mode 100644 index 0000000..e69de29 Apply without the setting: $ umask 0077 $ git apply d.patch $ ls -ld d drwx------ Apply with the setting: $ umask 0077 $ git -c core.sharedRepository=0770 apply d.patch $ ls -ld d drwxrws--- Only the leading directories are affected. That's because they are created with safe_create_leading_directories(), which calls adjust_shared_perm() to set the directories' permissions based on core.sharedRepository. To fix that, let's introduce a variant of this function that ignores the setting, and use it in apply. Also add a regression test and a note in the function documentation about the use of each variant according to the destination (working tree or git dir). Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-02t7900: speed up expensive testLibravatar Jeff King1-2/+4
A test marked with EXPENSIVE creates two 2.5GB files and adds them to the repository. This takes 194s to run on my machine, versus 2s when the EXPENSIVE prereq isn't set. We can trim this down a bit by doing two things: - use "git commit --quiet" to avoid spending time generating a diff summary (this actually only helps for the second commit, but I've added it here to both for consistency). This shaves off 8s. - set core.compression to 0. We know these files are full of random bytes, and so won't compress (that's the point of the test!). Spending cycles on zlib is pointless. This shaves off 122s. After this, my total time to run the script is 64s. That won't help normal runs without GIT_TEST_LONG set, of course, but it's easy enough to do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-12-01upload-pack: kill pack-objects helper on signal or exitLibravatar Jeff King1-0/+1
We spawn an external pack-objects process to actually send objects to the remote side. If we are killed by a signal during this process, then pack-objects may continue to run. As soon as it starts producing output for the pack, it will see a failure writing to upload-pack and exit itself. But before then, it may do significant work traversing the object graph, compressing deltas, etc, which will all be pointless. So let's make sure to kill as soon as we know that the caller will not read the result. There's no test here, since it's inherently racy, but here's an easy reproduction is on a large-ish repo like linux.git: - make sure you don't have pack bitmaps (since they make the enumerating phase go quickly). For linux.git it takes ~30s or so to walk the whole graph on my machine. - run "git clone --no-local -q . dst"; the "-q" is important because if pack-objects is writing progress to upload-pack (to get multiplexed over the sideband to the client), then it will notice pretty quickly the failure to write to stderr - kill the client-side clone process in another terminal (don't use ^C, as that will send SIGINT to all of the processes) - run "ps au | grep git" or similar to observe upload-pack dying within 5 seconds (it will send a keepalive that will notice the client has gone away) - but you'll still see pack-objects consuming 100% CPU (and 1GB+ of RAM) during the traversal and delta compression phases. It will exit as soon as it starts to write the pack (when it will notice that upload-pack went away). With this patch, pack-objects exits as soon as upload-pack does. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-30Ninth batchLibravatar Junio C Hamano1-0/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-30Merge branch 'sa/credential-store-timeout'Libravatar Junio C Hamano2-2/+12
Multiple "credential-store" backends can race to lock the same file, causing everybody else but one to fail---reattempt locking with some timeout to reduce the rate of the failure. * sa/credential-store-timeout: crendential-store: use timeout when locking file
2020-11-30Merge branch 'km/stash-error-message-fix'Libravatar Junio C Hamano1-1/+1
Error message fix. * km/stash-error-message-fix: stash: add missing space to an error message
2020-11-30Merge branch 'hn/sleep-millisec-decl'Libravatar Junio C Hamano2-1/+2
Move a definition of compatibility wrapper from cache.h to git-compat-util.h * hn/sleep-millisec-decl: move sleep_millisec to git-compat-util.h
2020-11-30Merge branch 'js/t3404-master-to-primary'Libravatar Junio C Hamano1-44/+45
A test script got cleaned up and then made not to depend on the value of init.defaultBranch. * js/t3404-master-to-primary: t3404: do not depend on any specific default branch name
2020-11-30Merge branch 'na/notes-displayref-is-not-boolean'Libravatar Junio C Hamano2-1/+6
Config parser fix for "git notes". * na/notes-displayref-is-not-boolean: t3301: test proper exit response to no-value notes.displayRef. notes.c: fix a segfault in notes_display_config()
2020-11-30Merge branch 'jc/do-not-just-explain-but-update-your-patch'Libravatar Junio C Hamano1-1/+15
Expectation for the original contributor after responding to a review comment to use the explanation in a patch update has been described. * jc/do-not-just-explain-but-update-your-patch: MyFirstContribition: answering questions is not the end of the story
2020-11-30Merge branch 'mt/worktree-error-message-fix'Libravatar Junio C Hamano1-2/+2
Fix formulation of an error message with two placeholders in "git worktree add" subcommand. * mt/worktree-error-message-fix: worktree: fix order of arguments in error message
2020-11-30Merge branch 'ab/gc-keep-base-option'Libravatar Junio C Hamano2-7/+7
Fix an option name in "gc" documentation. * ab/gc-keep-base-option: gc: rename keep_base_pack variable for --keep-largest-pack gc docs: change --keep-base-pack to --keep-largest-pack
2020-11-30Merge branch 'js/t1309-master-to-topic'Libravatar Junio C Hamano1-2/+2
Test preparation. * js/t1309-master-to-topic: t1309: use a neutral branch name in the `onbranch` test cases
2020-11-30Merge branch 'js/pull-rebase-use-advise'Libravatar Junio C Hamano2-14/+17
UI improvement. * js/pull-rebase-use-advise: pull: colorize the hint about setting `pull.rebase`
2020-11-30Merge branch 'js/t4015-wo-master'Libravatar Junio C Hamano1-3/+3
A test script got cleaned up not to depend on the value of init.defaultBranch. * js/t4015-wo-master: t4015: let the test pass with any default branch name
2020-11-30Merge branch 'js/t3040-cleanup'Libravatar Junio C Hamano1-3/+0
Cleanup. * js/t3040-cleanup: t3040: remove stale note
2020-11-30Merge branch 'js/t2106-cleanup'Libravatar Junio C Hamano1-14/+17
A test script got cleaned up and then made not to depend on the value of init.defaultBranch. * js/t2106-cleanup: t2106: ensure that the checkout fails for the expected reason t2106: make test independent of the current main branch name t2106: adjust style to the current conventions
2020-11-25Eighth batchLibravatar Junio C Hamano1-0/+32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-11-25Merge branch 'sg/tests-prereq'Libravatar Junio C Hamano2-4/+25
A lazily defined test prerequisite can now be defined in terms of another lazily defined test prerequisite. * sg/tests-prereq: tests: fix description of 'test_set_prereq' tests: make sure nested lazy prereqs work reliably
2020-11-25Merge branch 'rs/plug-diff-cache-leak'Libravatar Junio C Hamano1-0/+2
Memleak fix. * rs/plug-diff-cache-leak: diff-lib: plug minor memory leaks in do_diff_cache()
2020-11-25Merge branch 'rs/gc-sort-func-cast-fix'Libravatar Junio C Hamano1-4/+2
Fix broken sorting of maintenance tasks. * rs/gc-sort-func-cast-fix: gc: fix cast in compare_tasks_by_selection()
2020-11-25Merge branch 'jc/ci-github-set-env'Libravatar Junio C Hamano1-1/+1
Another CI adjustment. * jc/ci-github-set-env: ci: avoid `set-env` construct in print-test-failures.sh
2020-11-25Merge branch 'sg/t5310-jgit-wants-sha1'Libravatar Junio C Hamano1-2/+2
Since jgit does not yet work with SHA-256 repositories, mark the tests that uses it not to run unless we are testing with ShA-1 repositories. * sg/t5310-jgit-wants-sha1: t5310-pack-bitmaps: skip JGit tests with SHA256
2020-11-25Merge branch 'rs/archive-plug-leak-refname'Libravatar Junio C Hamano2-1/+2
Memleak fix. * rs/archive-plug-leak-refname: archive: release refname after use
2020-11-25Merge branch 'ma/list-object-filter-opt-msgfix'Libravatar Junio C Hamano1-1/+1
Error message fix. * ma/list-object-filter-opt-msgfix: list-objects-filter-options: fix function name in BUG
2020-11-25Merge branch 'pk/subsub-fetch-fix'Libravatar Junio C Hamano2-10/+67
"git fetch" did not work correctly with nested submodules where the innermost submodule that is not of interest got updated in the upstream, which has been corrected. * pk/subsub-fetch-fix: submodules: fix of regression on fetching of non-init subsub-repo
2020-11-25Merge branch 'jk/4gb-idx'Libravatar Junio C Hamano7-19/+19
The code was not prepared to deal with pack .idx file that is larger than 4GB. * jk/4gb-idx: packfile: detect overflow in .idx file size checks block-sha1: take a size_t length parameter fsck: correctly compute checksums on idx files larger than 4GB use size_t to store pack .idx byte offsets compute pack .idx byte offsets using size_t
2020-11-25Merge branch 'jx/t5411-flake-fix'Libravatar Junio C Hamano9-67/+545
The exchange between receive-pack and proc-receive hook did not carefully check for errors. * jx/t5411-flake-fix: receive-pack: use default version 0 for proc-receive receive-pack: gently write messages to proc-receive t5411: new helper filter_out_user_friendly_and_stable_output
2020-11-25Merge branch 'rs/hashwrite-be64'Libravatar Junio C Hamano3-9/+10
Code simplification. * rs/hashwrite-be64: pack-write: use hashwrite_be64() midx: use hashwrite_be64() csum-file: add hashwrite_be64()
2020-11-25Merge branch 'sg/bisect-approximately-halfway'Libravatar Junio C Hamano1-7/+20
"git bisect start/next" in a large span of history spends a lot of time trying to come up with exactly the half-way point; this can be optimized by stopping when we see a commit that is close enough to the half-way point. * sg/bisect-approximately-halfway: bisect: loosen halfway() check for a large number of commits
2020-11-25Merge branch 'fc/bash-completion-alias-of-alias'Libravatar Junio C Hamano2-18/+55
The command line completion script (in contrib/) learned to expand commands that are alias of alias. * fc/bash-completion-alias-of-alias: completion: bash: improve alias loop detection completion: bash: check for alias loop completion: bash: support recursive aliases