summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-23Merge branch 'dc/complete-restore'Libravatar Junio C Hamano1-0/+4
The command line completion support (in contrib/) learns to give modified paths to the "git restore" command. * dc/complete-restore: completion: tab completion of filenames for 'git restore'
2022-03-23Merge branch 'jc/cat-file-batch-default-format-optim'Libravatar Junio C Hamano2-6/+35
Optimize away strbuf_expand() call with a hardcoded formatting logic specific for the default format in the --batch and --batch-check options of "git cat-file". * jc/cat-file-batch-default-format-optim: cat-file: skip expanding default format
2022-03-23Merge branch 'js/in-place-reverse-in-sequencer'Libravatar Junio C Hamano1-6/+4
Code clean-up. * js/in-place-reverse-in-sequencer: sequencer: use reverse_commit_list() helper
2022-03-23Merge branch 'ac/test-lazy-fetch'Libravatar Junio C Hamano1-0/+19
A new test to ensure a lazy fetching is not triggered when it should not be. * ac/test-lazy-fetch: partial-clone: add a partial-clone test case
2022-03-23Merge branch 'ps/repack-with-server-info'Libravatar Junio C Hamano3-4/+63
"git repack" learned a new configuration to disable triggering of age-old "update-server-info" command, which is rarely useful these days. * ps/repack-with-server-info: repack: add config to skip updating server info repack: refactor to avoid double-negation of update-server-info
2022-03-23Merge branch 'ds/doc-maintenance-synopsis-fix'Libravatar Junio C Hamano1-18/+20
Doc update. * ds/doc-maintenance-synopsis-fix: maintenance: fix synopsis in documentation
2022-03-23Merge branch 'ab/reflog-prep-fix'Libravatar Junio C Hamano2-0/+11
Regression fix. * ab/reflog-prep-fix: reflog: don't be noisy on empty reflogs
2022-03-23Merge branch 'ep/remove-duplicated-includes'Libravatar Junio C Hamano6-6/+0
Code clean-up. * ep/remove-duplicated-includes: attr.h: remove duplicate struct definition t/helper/test-run-command.c: delete duplicate include builtin/stash.c: delete duplicate include builtin/sparse-checkout.c: delete duplicate include builtin/gc.c: delete duplicate include attr.c: delete duplicate include
2022-03-23Merge branch 'ep/t6423-modernize'Libravatar Junio C Hamano1-5/+5
Code clean-up. * ep/t6423-modernize: t6423-merge-rename-directories.sh: use the $(...) construct
2022-03-23Merge branch 'jk/name-rev-w-genno'Libravatar Junio C Hamano2-14/+175
"git name-rev" learned to use the generation numbers when setting the lower bound of searching commits used to explain the revision, when available, instead of committer time. * jk/name-rev-w-genno: name-rev: use generation numbers if available
2022-03-23Merge branch 'jd/userdiff-kotlin'Libravatar Junio C Hamano15-0/+167
A new built-in userdiff driver for kotlin. * jd/userdiff-kotlin: userdiff: add builtin diff driver for kotlin language.
2022-03-23Merge branch 'bc/block-sha1-without-gcc-asm-extension'Libravatar Junio C Hamano1-17/+0
Get rid of one use of __asm__() GCC extension that does not help us much these days, which has an added advantage of not having to worry about -pedantic complaining. * bc/block-sha1-without-gcc-asm-extension: block-sha1: remove use of obsolete x86 assembly
2022-03-23Merge branch 'gc/submodule-update-part1'Libravatar Junio C Hamano4-159/+183
Rewrite of "git submodule update" in C (early part). * gc/submodule-update-part1: submodule--helper update-clone: check for --filter and --init submodule update: add tests for --filter submodule--helper: remove ensure-core-worktree submodule--helper update-clone: learn --init submodule--helper: allow setting superprefix for init_submodule() submodule--helper: refactor get_submodule_displaypath() submodule--helper run-update-procedure: learn --remote submodule--helper: don't use bitfield indirection for parse_options() submodule--helper: get remote names from any repository submodule--helper run-update-procedure: remove --suboid submodule--helper: reorganize code for sh to C conversion submodule--helper: remove update-module-mode submodule tests: test for init and update failure output
2022-03-21The thirteenth batchLibravatar Junio C Hamano1-0/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-21Merge branch 'jy/gitweb-no-need-for-meta'Libravatar Junio C Hamano2-4/+15
Remove unneeded <meta http-equiv=content-type...> from gitweb output. * jy/gitweb-no-need-for-meta: gitweb: remove invalid http-equiv="content-type" comment: fix typo
2022-03-21Merge branch 'pw/single-key-interactive'Libravatar Junio C Hamano3-6/+33
The single-key interactive operation used by "git add -p" has been made more robust. * pw/single-key-interactive: add -p: disable stdin buffering when interactive.singlekey is set terminal: set VMIN and VTIME in non-canonical mode terminal: pop signal handler when terminal is restored terminal: always reset terminal when reading without echo
2022-03-21Merge branch 'ds/partial-bundles'Libravatar Junio C Hamano20-133/+317
Bundle file format gets extended to allow a partial bundle, filtered by similar criteria you would give when making a partial/lazy clone. * ds/partial-bundles: clone: fail gracefully when cloning filtered bundle bundle: unbundle promisor packs bundle: create filtered bundles rev-list: move --filter parsing into revision.c bundle: parse filter capability list-objects: handle NULL function pointers MyFirstObjectWalk: update recommended usage list-objects: consolidate traverse_commit_list[_filtered] pack-bitmap: drop filter in prepare_bitmap_walk() pack-objects: use rev.filter when possible revision: put object filter into struct rev_info list-objects-filter-options: create copy helper index-pack: document and test the --promisor option
2022-03-21Merge branch 'ep/test-malloc-check-with-glibc-2.34'Libravatar Junio C Hamano1-0/+18
The method to trigger malloc check used in our tests no longer work with newer versions of glibc. * ep/test-malloc-check-with-glibc-2.34: test-lib: declare local variables as local test-lib.sh: Use GLIBC_TUNABLES instead of MALLOC_CHECK_ on glibc >= 2.34
2022-03-21Merge branch 'sm/no-git-in-upstream-of-pipe-in-tests'Libravatar Junio C Hamano7-45/+72
Test fixes. * sm/no-git-in-upstream-of-pipe-in-tests: t0030-t0050: avoid pipes with Git on LHS t0001-t0028: avoid pipes with Git on LHS t0003: avoid pipes with Git on LHS
2022-03-16The twelfth batchLibravatar Junio C Hamano1-0/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-16Merge branch 'ab/string-list-count-in-size-t'Libravatar Junio C Hamano12-35/+39
Count string_list items in size_t, not "unsigned int". * ab/string-list-count-in-size-t: string-list API: change "nr" and "alloc" to "size_t" gettext API users: don't explicitly cast ngettext()'s "n"
2022-03-16Merge branch 'ab/racy-hooks'Libravatar Junio C Hamano8-25/+57
Code clean-up to allow callers of run_commit_hook() to learn if it got "success" because the hook succeeded or because there wasn't any hook. * ab/racy-hooks: hooks: fix an obscure TOCTOU "did we just run a hook?" race merge: don't run post-hook logic on --no-verify
2022-03-16Merge branch 'ab/keep-git-exit-codes-in-tests'Libravatar Junio C Hamano19-218/+245
Updates tests around the use of "test $(git cmd) = constant". * ab/keep-git-exit-codes-in-tests: rev-list simplify tests: don't ignore "git" exit code checkout tests: don't ignore "git <cmd>" exit code apply tests: don't ignore "git ls-files" exit code, drop sub-shell gettext tests: don't ignore "test-tool regex" exit code rev-list tests: don't hide abort() in "test_expect_failure" diff tests: don't ignore "git rev-list" exit code notes tests: don't ignore "git" exit code rev-parse tests: don't ignore "git reflog" exit code merge tests: use "test_must_fail" instead of ad-hoc pattern apply tests: use "test_must_fail" instead of ad-hoc pattern diff tests: don't ignore "git diff" exit code in "read" loop diff tests: don't ignore "git diff" exit code read-tree tests: check "diff-files" exit code on failure tests: use "test_stdout_line_count", not "test $(git [...] | wc -l)" tests: change some 'test $(git) = "x"' to test_cmp
2022-03-16Merge branch 'tk/t7063-chmtime-dirs-too'Libravatar Junio C Hamano2-16/+28
Teach "test-chmtime" to work on a directory and use it to avoid having to wait for a second in a few places in tests. * tk/t7063-chmtime-dirs-too: t7063: mtime-mangling instead of delays in untracked cache testing t/helper/test-chmtime: update mingw to support chmtime on directories
2022-03-16Merge branch 'ds/commit-graph-gen-v2-fixes'Libravatar Junio C Hamano8-58/+176
Fixes to the way generation number v2 in the commit-graph files are (not) handled. * ds/commit-graph-gen-v2-fixes: commit-graph: declare bankruptcy on GDAT chunks commit-graph: fix generation number v2 overflow values commit-graph: start parsing generation v2 (again) commit-graph: fix ordering bug in generation numbers t5318: extract helpers to lib-commit-graph.sh test-read-graph: include extra post-parse info
2022-03-16Merge branch 'jc/stash-drop'Libravatar Junio C Hamano7-467/+527
"git stash drop" is reimplemented as an internal call to reflog_delete() function, instead of invoking "git reflog delete" via run_command() API. * jc/stash-drop: stash: call reflog_delete() in reflog.c reflog: libify delete reflog function and helpers stash: add tests to ensure reflog --rewrite --updatref behavior
2022-03-16Merge branch 'tb/rename-remote-progress'Libravatar Junio C Hamano3-10/+35
"git remote rename A B", depending on the number of remote-tracking refs involved, takes long time renaming them. The command has been taught to show progress bar while making the user wait. * tb/rename-remote-progress: builtin/remote.c: show progress when renaming remote references builtin/remote.c: parse options in 'rename'
2022-03-16Merge branch 'vd/sparse-read-tree'Libravatar Junio C Hamano7-13/+308
"git read-tree" has been made to be aware of the sparse-index feature. * vd/sparse-read-tree: read-tree: make three-way merge sparse-aware read-tree: make two-way merge sparse-aware read-tree: narrow scope of index expansion for '--prefix' read-tree: integrate with sparse index read-tree: expand sparse checkout test coverage read-tree: explicitly disallow prefixes with a leading '/' status: fix nested sparse directory diff in sparse index sparse-index: prevent repo root from becoming sparse
2022-03-16Merge branch 'ab/object-file-api-updates'Libravatar Junio C Hamano36-137/+202
Object-file API shuffling. * ab/object-file-api-updates: object-file API: pass an enum to read_object_with_reference() object-file.c: add a literal version of write_object_file_prepare() object-file API: have hash_object_file() take "enum object_type" object API: rename hash_object_file_literally() to write_*() object-file API: split up and simplify check_object_signature() object API users + docs: check <0, not !0 with check_object_signature() object API docs: move check_object_signature() docs to cache.h object API: correct "buf" v.s. "map" mismatch in *.c and *.h object-file API: have write_object_file() take "enum object_type" object-file API: add a format_object_header() function object-file API: return "void", not "int" from hash_object_file() object-file.c: split up declaration of unrelated variables
2022-03-16Merge branch 'mf/fix-type-in-config-h'Libravatar Junio C Hamano1-1/+1
"git config -h" did not describe the "--type" option correctly. * mf/fix-type-in-config-h: config: correct "--type" option in "git config -h" output
2022-03-16Merge branch 'ps/fetch-mirror-optim'Libravatar Junio C Hamano10-33/+122
Various optimization for "git fetch". * ps/fetch-mirror-optim: refs/files-backend: optimize reading of symbolic refs remote: read symbolic refs via `refs_read_symbolic_ref()` refs: add ability for backends to special-case reading of symbolic refs fetch: avoid lookup of commits when not appending to FETCH_HEAD upload-pack: look up "want" lines via commit-graph
2022-03-16Merge branch 'tk/empty-untracked-cache'Libravatar Junio C Hamano2-3/+14
The untracked cache newly computed weren't written back to the on-disk index file when there is no other change to the index, which has been corrected. * tk/empty-untracked-cache: untracked-cache: write index when populating empty untracked cache t7519: populate untracked cache before test t7519: avoid file to index mtime race for untracked cache
2022-03-16Merge branch 'ab/grep-patterntype'Libravatar Junio C Hamano1-1/+0
Test fix-up for a topic already in master. * ab/grep-patterntype: log tests: fix "abort tests early" regression in ff37a60c369
2022-03-16partial-clone: add a partial-clone test caseLibravatar Abhradeep Chakraborty1-0/+19
In a blobless-cloned repo, `git log --follow -- <path>` (`<path>` have an exact OID rename) shouldn't download blob of the file from where the new file is renamed. Add a test case to verify it. Signed-off-by: Abhradeep Chakraborty <chakrabortyabhradeep79@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-16sequencer: use reverse_commit_list() helperLibravatar Jayati Shrivastava1-6/+4
Instead of creating a new allocation, reverse the original list in-place by calling the reverse_commit_list() helper. The original code discards the list "bases" after storing its reverse copy in a newly created list "reversed". If the code that followed from here used both "bases" and "reversed", the modification would not have worked, but since the original list "bases" gets discarded, we can simply reverse "bases" in-place with the reverse_commit_list() helper and reuse the same variable in the code that follows. builtin/merge.c has been left unmodified, since in its case, the original list is needed separately from its reverse copy by the code. Signed-off-by: Jayati Shrivastava <gaurijove@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-15completion: tab completion of filenames for 'git restore'Libravatar David Cantrell1-0/+4
If no --args are present after 'git restore', it assumes that you want to tab-complete one of the files with unstaged uncommitted changes. If a file has been staged, we don't want to list it, as restoring those requires a slightly more complex `git restore --staged`, so we only list those files that are --modified. While --committable also looks like a good candidate, that includes changes that have been staged. Signed-off-by: David Cantrell <david@cantrell.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-15maintenance: fix synopsis in documentationLibravatar Derrick Stolee1-18/+20
The synopsis for 'git maintenance' did not include the commands other than the 'run' command. Update this to include the others. The 'start' command is the only one of these that parses additional options, and then only the --scheduler option. Also move the 'register' command down after 'stop' and before 'unregister' for a logical grouping of the commands instead of an alphabetical one. The diff makes it look as three other commands are moved up. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-15cat-file: skip expanding default formatLibravatar John Cai2-6/+35
When format is passed into --batch, --batch-check, --batch-command, the format gets expanded. When nothing is passed in, the default format is set and the expand_format() gets called. We can save on these cycles by hardcoding how to print the information when nothing is passed as the format, or when the default format is passed. There is no need for the fully expanded format with the default. Since batch_object_write() happens on every object provided in batch mode, we get a nice performance improvement. git rev-list --all > /tmp/all-obj.txt git cat-file --batch-check </tmp/all-obj.txt with HEAD^: Time (mean ± σ): 57.6 ms ± 1.7 ms [User: 51.5 ms, System: 6.2 ms] Range (min … max): 54.6 ms … 64.7 ms 50 runs with HEAD: Time (mean ± σ): 49.8 ms ± 1.7 ms [User: 42.6 ms, System: 7.3 ms] Range (min … max): 46.9 ms … 55.9 ms 56 runs If nothing is provided as a format argument, or if the default format is passed, skip expanding of the format and print the object info with a default format. See https://lore.kernel.org/git/87eecf8ork.fsf@evledraar.gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-14repack: add config to skip updating server infoLibravatar Patrick Steinhardt3-1/+28
By default, git-repack(1) will update server info that is required by the dumb HTTP transport. This can be skipped by passing the `-n` flag, but what we're noticably missing is a config option to permanently disable updating this information. Add a new option "repack.updateServerInfo" which can be used to disable the logic. Most hosting providers have turned off the dumb HTTP protocol anyway, and on the client-side it woudln't typically be useful either. Giving a persistent way to disable this feature thus makes quite some sense to avoid wasting compute cycles and storage. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-14repack: refactor to avoid double-negation of update-server-infoLibravatar Patrick Steinhardt2-4/+36
By default, git-repack(1) runs `update_server_info()` to generate info required for the dumb HTTP protocol. This can be disabled via the `-n` flag, which then sets the `no_update_server_info` flag. Further down the code this leads to some double-negation logic, which is about to become more confusing as we're about to add a new config which allows the user to permanently disable generation of the info. Refactor the code to avoid the double-negation and add some tests which verify that the flag continues to work as expected. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-14attr.h: remove duplicate struct definitionLibravatar Elia Pinto1-1/+0
struct index_state is declared more than once. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-13The eleventh batchLibravatar Junio C Hamano1-0/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-03-13Merge branch 'ab/plug-random-leaks'Libravatar Junio C Hamano21-62/+113
Plug random memory leaks. * ab/plug-random-leaks: repository.c: free the "path cache" in repo_clear() range-diff: plug memory leak in read_patches() range-diff: plug memory leak in common invocation lockfile API users: simplify and don't leak "path" commit-graph: stop fill_oids_from_packs() progress on error and free() commit-graph: fix memory leak in misused string_list API submodule--helper: fix trivial leak in module_add() transport: stop needlessly copying bundle header references bundle: call strvec_clear() on allocated strvec remote-curl.c: free memory in cmd_main() urlmatch.c: add and use a *_release() function diff.c: free "buf" in diff_words_flush() merge-base: free() allocated "struct commit **" list index-pack: fix memory leaks
2022-03-13Merge branch 'nj/read-tree-doc-reffix'Libravatar Junio C Hamano1-2/+2
Documentation mark-up fix. * nj/read-tree-doc-reffix: Documentation: git-read-tree: separate links using commas
2022-03-13Merge branch 'ps/fetch-atomic-fixup'Libravatar Junio C Hamano1-15/+5
Test simplification. * ps/fetch-atomic-fixup: t5503: simplify setup of test which exercises failure of backfill
2022-03-13Merge branch 'fs/gpgsm-update'Libravatar Junio C Hamano3-8/+15
Newer version of GPGSM changed its output in a backward incompatible way to break our code that parses its output. It also added more processes our tests need to kill when cleaning up. Adjustments have been made to accommodate these changes. * fs/gpgsm-update: t/lib-gpg: kill all gpg components, not just gpg-agent t/lib-gpg: reload gpg components after updating trustlist gpg-interface/gpgsm: fix for v2.3
2022-03-13Merge branch 'gc/parse-tree-indirect-errors'Libravatar Junio C Hamano2-3/+12
Check the return value from parse_tree_indirect() to turn segfaults into calls to die(). * gc/parse-tree-indirect-errors: checkout, clone: die if tree cannot be parsed
2022-03-13Merge branch 'en/merge-ort-align-verbosity-with-recursive'Libravatar Junio C Hamano1-2/+3
Align the level of verbose output from the ort backend during inner merge to that of the recursive backend. * en/merge-ort-align-verbosity-with-recursive: merge-ort: exclude messages from inner merges by default
2022-03-13Merge branch 'ab/make-optim-noop'Libravatar Junio C Hamano10-160/+165
Makefile refactoring with a bit of suffixes rule stripping to optimize the runtime overhead. * ab/make-optim-noop: Makefiles: add and use wildcard "mkdir -p" template Makefile: add "$(QUIET)" boilerplate to shared.mak Makefile: move $(comma), $(empty) and $(space) to shared.mak Makefile: move ".SUFFIXES" rule to shared.mak Makefile: define $(LIB_H) in terms of $(FIND_SOURCE_FILES) Makefile: disable GNU make built-in wildcard rules Makefiles: add "shared.mak", move ".DELETE_ON_ERROR" to it scalar Makefile: use "The default target of..." pattern
2022-03-13Merge branch 'ps/fetch-atomic'Libravatar Junio C Hamano5-61/+262
"git fetch" can make two separate fetches, but ref updates coming from them were in two separate ref transactions under "--atomic", which has been corrected. * ps/fetch-atomic: fetch: make `--atomic` flag cover pruning of refs fetch: make `--atomic` flag cover backfilling of tags refs: add interface to iterate over queued transactional updates fetch: report errors when backfilling tags fails fetch: control lifecycle of FETCH_HEAD in a single place fetch: backfill tags before setting upstream fetch: increase test coverage of fetches