summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-06Merge branch 'os/status-docfix'Libravatar Junio C Hamano1-1/+1
Docfix. * os/status-docfix: doc: fix capitalization in "git status --porcelain=v2" description
2021-10-06Merge branch 'ws/refer-to-forkpoint-config-in-rebase-doc'Libravatar Junio C Hamano1-1/+2
Doc update. * ws/refer-to-forkpoint-config-in-rebase-doc: Document `rebase.forkpoint` in rebase man page
2021-10-06Merge branch 'gc/doc-first-contribution-reroll'Libravatar Junio C Hamano1-11/+31
Doc update. * gc/doc-first-contribution-reroll: MyFirstContribution: Document --range-diff option when writing v2
2021-10-06Merge branch 'pw/rebase-reread-todo-after-editing'Libravatar Junio C Hamano2-21/+27
The code to re-read the edited todo list in "git rebase -i" was made more robust. * pw/rebase-reread-todo-after-editing: rebase: fix todo-list rereading sequencer.c: factor out a function
2021-10-06Merge branch 'ew/midx-doc-update'Libravatar Junio C Hamano1-1/+3
Doc tweak. * ew/midx-doc-update: doc/technical: update note about core.multiPackIndex
2021-10-06Merge branch 'ab/repo-settings-cleanup'Libravatar Junio C Hamano9-94/+98
Code cleanup. * ab/repo-settings-cleanup: repository.h: don't use a mix of int and bitfields repo-settings.c: simplify the setup read-cache & fetch-negotiator: check "enum" values in switch() environment.c: remove test-specific "ignore_untracked..." variable wrapper.c: add x{un,}setenv(), and use xsetenv() in environment.c
2021-10-06Merge branch 'jk/grep-haystack-is-read-only'Libravatar Junio C Hamano2-46/+45
Code clean-up in the "grep" machinery. * jk/grep-haystack-is-read-only: grep: store grep_source buffer as const grep: mark "haystack" buffers as const grep: stop modifying buffer in grep_source_1() grep: stop modifying buffer in show_line() grep: stop modifying buffer in strip_timestamp
2021-10-06Merge branch 'tb/commit-graph-usage-fix'Libravatar Junio C Hamano4-16/+39
Regression in "git commit-graph" command line parsing has been corrected. * tb/commit-graph-usage-fix: builtin/multi-pack-index.c: disable top-level --[no-]progress builtin/commit-graph.c: don't accept common --[no-]progress
2021-10-06Merge branch 'pw/rebase-of-a-tag-fix'Libravatar Junio C Hamano2-87/+67
"git rebase <upstream> <tag>" failed when aborted in the middle, as it mistakenly tried to write the tag object instead of peeling it to HEAD. * pw/rebase-of-a-tag-fix: rebase: dereference tags rebase: use lookup_commit_reference_by_name() rebase: use our standard error return value t3407: rework rebase --quit tests t3407: strengthen rebase --abort tests t3407: use test_path_is_missing t3407: rename a variable t3407: use test_cmp_rev t3407: use test_commit t3407: run tests in $TEST_DIRECTORY
2021-10-06Merge branch 'jt/add-submodule-odb-clean-up'Libravatar Junio C Hamano11-97/+102
More code paths that use the hack to add submodule's object database to the set of alternate object store have been cleaned up. * jt/add-submodule-odb-clean-up: revision: remove "submodule" from opt struct repository: support unabsorbed in repo_submodule_init submodule: remove unnecessary unabsorbed fallback
2021-10-03The tenth batchLibravatar Junio C Hamano1-0/+34
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-03Merge branch 'ah/connect-parse-feature-v0-fix'Libravatar Junio C Hamano2-0/+17
Protocol v0 clients can get stuck parsing a malformed feature line. * ah/connect-parse-feature-v0-fix: connect: also update offset for features without values
2021-10-03Merge branch 'ab/make-compdb-fix'Libravatar Junio C Hamano1-0/+1
Build update. * ab/make-compdb-fix: Makefile: pass -Wno-pendantic under GENERATE_COMPILATION_DATABASE=yes
2021-10-03Merge branch 'bs/difftool-msg-tweak'Libravatar Junio C Hamano1-3/+3
Message tweak. * bs/difftool-msg-tweak: difftool: fix word spacing in the usage strings
2021-10-03Merge branch 'rs/close-pack-leakfix'Libravatar Junio C Hamano1-0/+1
Leakfix. * rs/close-pack-leakfix: packfile: release bad_objects in close_pack()
2021-10-03Merge branch 'ab/bundle-remove-verbose-option'Libravatar Junio C Hamano1-3/+0
Doc update. * ab/bundle-remove-verbose-option: bundle: remove ignored & undocumented "--verbose" flag
2021-10-03Merge branch 'ab/auto-depend-with-pedantic'Libravatar Junio C Hamano1-0/+1
Improve build procedure for developers. * ab/auto-depend-with-pedantic: Makefile: make COMPUTE_HEADER_DEPENDENCIES=auto work with DEVOPTS=pedantic
2021-10-03Merge branch 'ab/make-clean-depend-dirs'Libravatar Junio C Hamano1-1/+0
"make clean" has been updated to remove leftover .depend/ directories, even when it is not told to use them to compute header dependencies. * ab/make-clean-depend-dirs: Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes
2021-10-03Merge branch 'ds/perf-test-built-path-fix'Libravatar Junio C Hamano1-1/+1
Perf test fix. * ds/perf-test-built-path-fix: t/perf/run: fix bin-wrappers computation
2021-10-03Merge branch 'jk/http-redact-fix'Libravatar Junio C Hamano2-15/+15
Sensitive data in the HTTP trace were supposed to be redacted, but we failed to do so in HTTP/2 requests. * jk/http-redact-fix: http: match headers case-insensitively when redacting
2021-10-03Merge branch 'bs/ls-files-opt-help-text-update'Libravatar Junio C Hamano1-2/+2
Help text for "ls-files" options have been updated. * bs/ls-files-opt-help-text-update: ls-files: use imperative mood for -X and -z option description
2021-10-03Merge branch 'da/difftool-dir-diff-symlink-fix'Libravatar Junio C Hamano2-2/+67
"git difftool --dir-diff" mishandled symbolic links. * da/difftool-dir-diff-symlink-fix: difftool: fix symlink-file writing in dir-diff mode
2021-10-03Merge branch 'hn/refs-errno-cleanup'Libravatar Junio C Hamano7-151/+146
Futz with the way 'errno' is relied on in the refs API to carry the failure modes up the call chain. * hn/refs-errno-cleanup: refs: make errno output explicit for read_raw_ref_fn refs/files-backend: stop setting errno from lock_ref_oid_basic refs: remove EINVAL errno output from specification of read_raw_ref_fn refs file backend: move raceproof_create_file() here
2021-10-03Merge branch 'ab/refs-files-cleanup'Libravatar Junio C Hamano8-123/+64
Continued work on top of the hn/refs-errno-cleanup topic. * ab/refs-files-cleanup: refs/files: remove unused "errno != ENOTDIR" condition refs/files: remove unused "errno == EISDIR" code refs/files: remove unused "oid" in lock_ref_oid_basic() refs API: remove OID argument to reflog_expire() reflog expire: don't lock reflogs using previously seen OID refs/files: add a comment about refs_reflog_exists() call refs: make repo_dwim_log() accept a NULL oid refs/debug: re-indent argument list for "prepare" refs/files: remove unused "skip" in lock_raw_ref() too refs/files: remove unused "extras/skip" in lock_ref_oid_basic() refs: drop unused "flags" parameter to lock_ref_oid_basic() refs/files: remove unused REF_DELETING in lock_ref_oid_basic() refs/packet: add missing BUG() invocations to reflog callbacks
2021-10-03Merge branch 'cb/cvsserver'Libravatar Junio C Hamano3-17/+24
"git cvsserver" had a long-standing bug in its authentication code, which has finally been corrected (it is unclear and is a separate question if anybody is seriously using it, though). * cb/cvsserver: Documentation: cleanup git-cvsserver git-cvsserver: protect against NULL in crypt(3) git-cvsserver: use crypt correctly to compare password hashes
2021-10-03Merge branch 'jx/ci-l10n'Libravatar Junio C Hamano1-0/+105
CI help for l10n. * jx/ci-l10n: ci: new github-action for git-l10n code review
2021-10-03Merge branch 'jk/clone-unborn-head-in-bare'Libravatar Junio C Hamano2-16/+30
"git clone" from a repository whose HEAD is unborn into a bare repository didn't follow the branch name the other side used, which is corrected. * jk/clone-unborn-head-in-bare: clone: handle unborn branch in bare repos
2021-10-03Merge branch 'en/stash-df-fix'Libravatar Junio C Hamano2-3/+75
"git stash", where the tentative change involves changing a directory to a file (or vice versa), was confused, which has been corrected. * en/stash-df-fix: stash: restore untracked files AFTER restoring tracked files stash: avoid feeding directories to update-index t3903: document a pair of directory/file bugs
2021-09-28doc: fix capitalization in "git status --porcelain=v2" descriptionLibravatar Orgad Shaneh1-1/+1
The summary line had xy, while the description (and other sub-sections) has XY. Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-28The ninth batchLibravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-28Merge branch 'en/typofixes'Libravatar Junio C Hamano2-2/+2
Typofixes. * en/typofixes: merge-ort: fix completely wrong comment trace2.h: fix trivial comment typo
2021-09-28Merge branch 'cb/unicode-14'Libravatar Junio C Hamano1-15/+29
The unicode character width table (used for output alignment) has been updated. * cb/unicode-14: unicode: update the width tables to Unicode 14
2021-09-28Merge branch 'jk/reduce-malloc-in-v2-servers'Libravatar Junio C Hamano4-59/+164
Code cleanup to limit memory consumption and tighten protocol message parsing. * jk/reduce-malloc-in-v2-servers: ls-refs: reject unknown arguments serve: reject commands used as capabilities serve: reject bogus v2 "command=ls-refs=foo" docs/protocol-v2: clarify some ls-refs ref-prefix details ls-refs: ignore very long ref-prefix counts serve: drop "keys" strvec serve: provide "receive" function for session-id capability serve: provide "receive" function for object-format capability serve: add "receive" method for v2 capabilities table serve: return capability "value" from get_capability() serve: rename is_command() to parse_command()
2021-09-27Makefile: pass -Wno-pendantic under GENERATE_COMPILATION_DATABASE=yesLibravatar Ævar Arnfjörð Bjarmason1-0/+1
The same bug fixed in the "COMPUTE_HEADER_DEPENDENCIES=auto" mode in the preceding commit was also present with "GENERATE_COMPILATION_DATABASE=yes". Let's fix it so it works again with "DEVOPTS=1". Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-27connect: also update offset for features without valuesLibravatar Andrzej Hunt2-0/+17
parse_feature_value() takes an offset, and uses it to seek past the point in features_list that we've already seen. However if the feature being searched for does not specify a value, the offset is not updated. Therefore if we call parse_feature_value() in a loop on a value-less feature, we'll keep on parsing the same feature over and over again. This usually isn't an issue: there's no point in using next_server_feature_value() to search for repeated instances of the same capability unless that capability typically specifies a value - but a broken server could send a response that omits the value for a feature even when we are expecting a value. Therefore we add an offset update calculation for the no-value case, which helps ensure that loops using next_server_feature_value() will always terminate. next_server_feature_value(), and the offset calculation, were first added in 2.28 in 2c6a403d96 (connect: add function to parse multiple v1 capability values, 2020-05-25). Thanks to Peff for authoring the test. Co-authored-by: Jeff King <peff@peff.net> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Andrzej Hunt <andrzej@ahunt.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-24packfile: release bad_objects in close_pack()Libravatar René Scharfe1-0/+1
Unusable entries of a damaged pack file are recorded in the oidset bad_objects. Release it when we're done with the pack. This doesn't affect intact packs because an empty oidset requires no allocation. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-24rebase: fix todo-list rereadingLibravatar Phillip Wood2-12/+8
54fd3243da ("rebase -i: reread the todo list if `exec` touched it", 2017-04-26) sought to reread the todo list after running an exec command only if it had been changed. To accomplish this it checks the stat data of the todo list after running an exec command to see if it has changed. Unfortunately there are two problems, firstly the implementation is buggy we actually reread the list after each exec which is quadratic in the number of commit lookups and secondly the design is predicated on using nanosecond time stamps which are not the default. The implementation bug stems from the fact that we write a new todo list to disk before running each command but do not update the stat data to reflect this[1]. The design problem is that it is possible for the user to edit the todo list without changing its size or inode which means we have to rely on the mtime to tell us if it has changed. Unfortunately unless git is built with USE_NSEC it is possible for the original and edited list to share the same mtime. Ideally "git rebase --edit-todo" would set a flag that we would then check in sequencer.c. Unfortunately this is approach will not work as there are scripts in the wild that write to the todo list directly without running "git rebase --edit-todo". Instead of relying on stat data this patch simply reads the possibly edited todo list and compares it to the original with memcmp(). This is much faster than reparsing the todo list each time. This patch reduces the time to run git rebase -r -xtrue v2.32.0~100 v2.32.0 which runs 419 exec commands by 6.6%. For comparison fixing the implementation bug in stat based approach reduces the time by a further 1.4% and is indistinguishable from never rereading the todo list. [1] https://lore.kernel.org/git/20191125131833.GD23183@szeder.dev/ Reported-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-24sequencer.c: factor out a functionLibravatar Phillip Wood1-14/+24
This code is heavily indented and obscures the high level logic within the loop. Let's move it to its own function before modifying it in the next commit. Note that there is a subtle change in behavior if the todo list cannot be reread. Previously todo_list->current was incremented before returning, now it returns immediately. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-24doc/technical: update note about core.multiPackIndexLibravatar Eric Wong1-1/+3
MIDX files are used by default since commit 18e449f86b74 (midx: enable core.multiPackIndex by default, 2020-09-25) Helped-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-23bundle: remove ignored & undocumented "--verbose" flagLibravatar Ævar Arnfjörð Bjarmason1-3/+0
In 73c3253d75e (bundle: framework for options before bundle file, 2019-11-10) the "git bundle" command was refactored to use parse_options(). In that refactoring it started understanding the "--verbose" flag before the subcommand, e.g.: git bundle --verbose verify --quiet However, nothing ever did anything with this "verbose" variable, and the change wasn't documented. It appears to have been something that escaped the lab, and wasn't flagged by reviewers at the time. Let's just remove it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-23The eighth batchLibravatar Junio C Hamano1-0/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-23Merge branch 'rs/use-xopen-in-index-pack'Libravatar Junio C Hamano2-8/+9
Code clean-up. * rs/use-xopen-in-index-pack: index-pack: use xopen in init_thread
2021-09-23Merge branch 'kz/revindex-comment-fix'Libravatar Junio C Hamano1-2/+2
Header comment fix. * kz/revindex-comment-fix: pack-revindex.h: correct the time complexity descriptions
2021-09-23Merge branch 'cb/plug-leaks-in-alloca-emu-users'Libravatar Junio C Hamano2-12/+15
Leakfix. * cb/plug-leaks-in-alloca-emu-users: t0000: avoid masking git exit value through pipes tree-diff: fix leak when not HAVE_ALLOCA_H
2021-09-23Merge branch 'jt/submodule-name-to-gitdir'Libravatar Junio C Hamano5-27/+72
Code refactoring. * jt/submodule-name-to-gitdir: submodule: extract path to submodule gitdir func
2021-09-23Merge branch 'ma/doc-git-version'Libravatar Junio C Hamano2-0/+32
Doc update. * ma/doc-git-version: documentation: add documentation for 'git version'
2021-09-23Merge branch 'ma/help-w-check-for-requested-page'Libravatar Junio C Hamano2-3/+22
The error in "git help no-such-git-command" is handled better. * ma/help-w-check-for-requested-page: help: make sure local html page exists before calling external processes
2021-09-23Merge branch 'cb/unix-sockets-with-windows'Libravatar Junio C Hamano3-10/+55
Adjust credential-cache helper to Windows. * cb/unix-sockets-with-windows: git-compat-util: include declaration for unix sockets in windows credential-cache: check for windows specific errors t0301: fixes for windows compatibility
2021-09-23Merge branch 'ab/retire-option-argument'Libravatar Junio C Hamano6-52/+26
An oddball OPTION_ARGUMENT feature has been removed from the parse-options API. * ab/retire-option-argument: parse-options API: remove OPTION_ARGUMENT feature difftool: use run_command() API in run_file_diff() difftool: prepare "diff" cmdline in cmd_difftool() difftool: prepare "struct child_process" in cmd_difftool()
2021-09-23Merge branch 'mr/bisect-in-c-4'Libravatar Junio C Hamano5-95/+186
Rewrite of "git bisect" in C continues. * mr/bisect-in-c-4: bisect--helper: retire `--bisect-next-check` subcommand bisect--helper: reimplement `bisect_run` shell function in C bisect--helper: reimplement `bisect_visualize()` shell function in C run-command: make `exists_in_PATH()` non-static t6030-bisect-porcelain: add test for bisect visualize t6030-bisect-porcelain: add tests to control bisect run exit cases