summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-10-10Merge branch 'tb/midx-repack-ignore-cruft-packs'Junio C Hamano3-6/+107
"git multi-pack-index repack/expire" used to repack unreachable cruft into a new pack, which have been corrected. * tb/midx-repack-ignore-cruft-packs: midx.c: avoid cruft packs with non-zero `repack --batch-size` midx.c: remove unnecessary loop condition midx.c: replace `xcalloc()` with `CALLOC_ARRAY()` midx.c: avoid cruft packs with `repack --batch-size=0` midx.c: prevent `expire` from removing the cruft pack Documentation/git-multi-pack-index.txt: clarify expire behavior Documentation/git-multi-pack-index.txt: fix typo
2022-10-10Merge branch 'hn/parse-worktree-ref'Junio C Hamano8-150/+126
Code and semantics cleaning. * hn/parse-worktree-ref: refs: unify parse_worktree_ref() and ref_type()
2022-10-10Merge branch 'ja/rebase-i-avoid-amending-self'Junio C Hamano2-2/+15
"git rebase -i" can mistakenly attempt to apply a fixup to a commit itself, which has been corrected. * ja/rebase-i-avoid-amending-self: sequencer: avoid dropping fixup commit that targets self via commit-ish
2022-10-10Merge branch 'rj/ref-filter-get-head-description-leakfix'Junio C Hamano1-0/+2
Leakfix. * rj/ref-filter-get-head-description-leakfix: ref-filter.c: fix a leak in get_head_description
2022-10-10Merge branch 'jc/environ-docs'Junio C Hamano2-16/+28
Documentation on various Boolean GIT_* environment variables have been clarified. * jc/environ-docs: environ: GIT_INDEX_VERSION affects not just a new repository environ: simplify description of GIT_INDEX_FILE environ: GIT_FLUSH should be made a usual Boolean environ: explain Boolean environment variables environ: document GIT_SSL_NO_VERIFY
2022-10-10Merge branch 'ah/branch-autosetupmerge-grammofix'Junio C Hamano1-2/+2
Fix grammar of a message introduced in previous round. * ah/branch-autosetupmerge-grammofix: push: improve grammar of branch.autoSetupMerge advice
2022-10-10Merge branch 'ab/test-malloc-with-sanitize-leak'Junio C Hamano1-1/+3
Test fix. * ab/test-malloc-with-sanitize-leak: test-lib: have SANITIZE=leak imply TEST_NO_MALLOC_CHECK
2022-10-10Merge branch 'sy/sparse-grep'Junio C Hamano3-3/+118
"git grep" learned to expand the sparse-index more lazily and on demand in a sparse checkout. * sy/sparse-grep: builtin/grep.c: integrate with sparse index
2022-10-10Merge branch 'ds/scalar-unregister-idempotent'Junio C Hamano6-36/+96
"scalar unregister" in a repository that is already been unregistered reported an error. * ds/scalar-unregister-idempotent: string-list: document iterator behavior on NULL input gc: replace config subprocesses with API calls scalar: make 'unregister' idempotent maintenance: add 'unregister --force'
2022-10-10Merge branch 'mc/cred-helper-ignore-unknown'Junio C Hamano3-3/+14
Most credential helpers ignored unknown entries in a credential description, but a few died upon seeing them. The latter were taught to ignore them, too * mc/cred-helper-ignore-unknown: osxkeychain: clarify that we ignore unknown lines netrc: ignore unknown lines (do not die) wincred: ignore unknown lines (do not die)
2022-10-10Merge branch 'jk/remote-rename-without-fetch-refspec'Junio C Hamano2-21/+34
"git remote rename" failed to rename a remote without fetch refspec, which has been corrected. * jk/remote-rename-without-fetch-refspec: remote: handle rename of remote without fetch refspec
2022-10-10Merge branch 'jk/clone-allow-bare-and-o-together'Junio C Hamano2-7/+5
"git clone" did not like to see the "--bare" and the "--origin" options used together without a good reason. * jk/clone-allow-bare-and-o-together: clone: allow "--bare" with "-o"
2022-10-10Merge branch 'jk/fsck-on-diet'Junio C Hamano2-4/+5
"git fsck" failed to release contents of tree objects already used from the memory, which has been fixed. * jk/fsck-on-diet: parse_object_buffer(): respect save_commit_buffer fsck: turn off save_commit_buffer fsck: free tree buffers after walking unreachable objects
2022-10-10Merge branch 'so/diff-merges-cleanup'Junio C Hamano2-19/+27
Code clean-up. * so/diff-merges-cleanup: diff-merges: clarify log.diffMerges documentation diff-merges: cleanup set_diff_merges() diff-merges: cleanup func_by_opt()
2022-10-10Merge branch 'ah/fsmonitor-daemon-usage-non-l10n'Junio C Hamano1-2/+2
Fix messages incorrectly marked for translation. * ah/fsmonitor-daemon-usage-non-l10n: fsmonitor--daemon: don't translate literal commands
2022-10-09symbolic-ref: teach "--[no-]recurse" optionJunio C Hamano3-8/+35
Suppose you are managing many maintenance tracks in your project, and some of the more recent ones are maint-2.36 and maint-2.37. Further imagine that your project recently tagged the official 2.38 release, which means you would need to start maint-2.38 track soon, by doing: $ git checkout -b maint-2.38 v2.38.0^0 $ git branch --list 'maint-2.3[6-9]' * maint-2.38 maint-2.36 maint-2.37 So far, so good. But it also is reasonable to want not to have to worry about which maintenance track is the latest, by pointing a more generic-sounding 'maint' branch at it, by doing: $ git symbolic-ref refs/heads/maint refs/heads/maint-2.38 which would allow you to say "whichever it is, check out the latest maintenance track", by doing: $ git checkout maint $ git branch --show-current maint-2.38 It is arguably better to say that we are on 'maint-2.38' rather than on 'maint', and "git merge/pull" would record "into maint-2.38" and not "into maint", so I think what we have is a good behaviour. One thing that is slightly irritating, however, is that I do not think there is a good way (other than "cat .git/HEAD") to learn that you checked out 'maint' to get into that state. Just like the output of "git branch --show-current" shows above, "git symbolic-ref HEAD" would report 'refs/heads/maint-2.38', bypassing the intermediate symbolic ref at 'refs/heads/maint' that is pointed at by HEAD. The internal resolve_ref() API already has the necessary support for stopping after resolving a single level of a symbolic-ref, and we can expose it by adding a "--[no-]recurse" option to the command. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-08git.c: improve code readability in cmd_main()Daniel Sonbolian1-6/+8
Check for an error condition whose body unconditionally exists first, and then perform the special casing of "version" and "help" as part of the preparation for the "normal codepath". This makes the code simpler to read. Signed-off-by: Daniel Sonbolian <dsal3389@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-08dir: use fspathncmp() in pl_hashmap_cmp()Jeff King1-3/+1
Call fspathncmp() instead of open-coding it. This shortens the code and makes it less repetitive. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07branch: description for non-existent branch errorsRubén Justo2-2/+58
When the repository does not yet have commits, some errors describe that there is no branch: $ git init -b first $ git branch --edit-description first error: No branch named 'first'. $ git branch --set-upstream-to=upstream fatal: branch 'first' does not exist $ git branch -c second error: refname refs/heads/first not found fatal: Branch copy failed That "first" branch is unborn but to say it doesn't exists is confusing. Options "-c" (copy) and "-m" (rename) show the same error when the origin branch doesn't exists: $ git branch -c non-existent-branch second error: refname refs/heads/non-existent-branch not found fatal: Branch copy failed $ git branch -m non-existent-branch second error: refname refs/heads/non-existent-branch not found fatal: Branch rename failed Note that "--edit-description" without an explicit argument is already considering the _empty repository_ circumstance in its error. Also note that "-m" on the initial branch it is an allowed operation. Make the error descriptions for those branch operations with unborn or non-existent branches, more informative. This is the result of the change: $ git init -b first $ git branch --edit-description first error: No commit on branch 'first' yet. $ git branch --set-upstream-to=upstream fatal: No commit on branch 'first' yet. $ git branch -c second fatal: No commit on branch 'first' yet. $ git branch [-c/-m] non-existent-branch second fatal: No branch named 'non-existent-branch'. Signed-off-by: Rubén Justo <rjusto@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07Start 2.39 cycleJunio C Hamano3-2/+24
The version numbers do not mean much, but we may want to call the first one in 2023 version 3.1 or something, but let's just increment the second digit from the previous one for this cycle. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07Merge branch 'ac/fuzzers'Junio C Hamano6-6/+6
Source file shuffling. * ac/fuzzers: fuzz: reorganise the path for existing oss-fuzz fuzzers
2022-10-07Merge branch 'vd/fix-unaligned-read-index-v4'Junio C Hamano1-19/+42
The codepath that reads from the index v4 had unaligned memory accesses, which has been corrected. * vd/fix-unaligned-read-index-v4: read-cache: avoid misaligned reads in index v4
2022-10-07Merge branch 'es/retire-efgrep'Junio C Hamano1-0/+1
Prepare for GNU [ef]grep that throw warning of their uses. * es/retire-efgrep: check-non-portable-shell: detect obsolescent egrep/fgrep
2022-10-07Merge branch 'dd/retire-efgrep'Junio C Hamano23-55/+53
Prepare for GNU [ef]grep that throw warning of their uses. * dd/retire-efgrep: t: convert fgrep usage to "grep -F" t: convert egrep usage to "grep -E" t: remove \{m,n\} from BRE grep usage CodingGuidelines: allow grep -E
2022-10-07Merge branch 'ds/use-platform-regex-on-macos'Junio C Hamano5-3/+18
With a bit of header twiddling, use the native regexp library on macOS instead of the compat/ one. * ds/use-platform-regex-on-macos: grep: fix multibyte regex handling under macOS
2022-10-07SubmittingPatches: use usual capitalization in the log message bodyJunio C Hamano1-1/+3
Update the description of the summary section to clarify that the "do not capitalize" rule applies only the word after the "<area>:" prefix of the title and nowhere else. This hopefully will prevent folks from writing their proposed log message in all lowercase. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07bundle-uri: fix technical doc issuesDerrick Stolee1-4/+4
Two documentation issues exist in the technical docs for the bundle URI feature. First, there is an extraneous "the" across a linebreak, making the nonsensical phrase "the bundle the list" which should just be "the bundle list". Secondly, the asciidoc update treats the string "`have`s" as starting a "<code>" block, but the second tick is interpreted as an apostrophe instead of a closing "</code>" tag. This causes entire sentences to be formatted as code until the next one comes along. Simply adding a space here does not work properly as the rendered HTML keeps that space. Instead, restructure the sentence slightly to avoid using a plural, allowing the HTML to render correctly. Reported-by: Philip Oakley <philipoakley@iee.email> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-07bisect--helper: plug strvec leakRené Scharfe1-4/+3
The strvec "argv" is used to build a command for run_command_v_opt(), but never freed. Use a constant string array instead, which doesn't require any cleanup. Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-06Git 2.38.1v2.38.1Taylor Blau3-2/+7
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.37.4Taylor Blau73-62/+357
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.37.4v2.37.4Taylor Blau1-1/+1
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.36.3Taylor Blau71-60/+350
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06t7527: prepare for changing protocol.file.allowTaylor Blau1-0/+4
Explicitly cloning over the "file://" protocol in t7527 in preparation for merging a security release which will change the default value of this configuration to be "user". Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.36.3v2.36.3Taylor Blau3-2/+7
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.35.5Taylor Blau66-59/+305
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.35.5v2.35.5Taylor Blau3-2/+7
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.34.5Taylor Blau63-59/+295
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.34.5v2.34.5Taylor Blau3-2/+7
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.33.5Taylor Blau64-59/+295
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.33.5v2.33.5Taylor Blau3-2/+7
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.32.4Taylor Blau63-60/+291
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.32.4v2.32.4Taylor Blau2-1/+6
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.31.5Taylor Blau61-61/+282
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.31.5v2.31.5Taylor Blau2-1/+6
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Sync with 2.30.6Taylor Blau60-61/+277
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06Git 2.30.6v2.30.6Taylor Blau3-2/+62
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-10-06attr: drop DEBUG_ATTR codeJeff King1-38/+3
Since its inception in d0bfd026a8 (Add basic infrastructure to assign attributes to paths, 2007-04-12), the attribute code carries a little bit of debug code that is conditionally compiled only when DEBUG_ATTR is set. But since you have to know about it and make a special build of Git to use it, it's not clear that it's helping anyone (and there are very few mentions of it on the list over the years). Meanwhile, it causes slight headaches. Since it's not built as part of a regular compile, it's subject to bitrot. E.g., this was dealt with in 712efb1a42 (attr: make it build with DEBUG_ATTR again, 2013-01-15), and it currently fails to build with DEVELOPER=1 since e810e06357 (attr: tighten const correctness with git_attr and match_attr, 2017-01-27). And it causes confusion with -Wunused-parameter; the "what" parameter of fill_one() is unused in a normal build, but needed in a debug build. Let's just get rid of this code (and the now-useless parameter). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-06commit: avoid writing to global in option callbackJeff King1-2/+2
The callback function for --trailer writes directly to the global trailer_args and ignores opt->value completely. This is OK, since that's where we expect to find the value. But it does mean the option declaration isn't as clear. E.g., we have: OPT_BOOL(0, "reset-author", &renew_authorship, ...), OPT_CALLBACK_F(0, "trailer", NULL, ..., opt_pass_trailer) In the first one we can see where the result will be stored, but in the second, we get only NULL, and you have to go read the callback. Let's pass &trailer_args, and use it in the callback. As a bonus, this silences a -Wunused-parameter warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-06multi-pack-index: avoid writing to global in option callbackJeff King1-3/+4
We declare the --object-dir option like: OPT_CALLBACK(0, "object-dir", &opts.object_dir, ...); but the pointer to opts.object_dir is completely unused. Instead, the callback writes directly to a global. Which fortunately happens to be opts.object_dir. So everything works as expected, but it's unnecessarily confusing. Instead, let's have the callback write to the option value pointer that has been passed in. This also quiets a -Wunused-parameter warning (since we don't otherwise look at "opt"). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-06test-submodule: inline resolve_relative_url() functionJeff King1-14/+8
The resolve_relative_url() function takes argc and argv parameters; it then reads up to 3 elements of argv without looking at argc at all. At first glance, this seems like a bug. But it has only one caller, cmd__submodule_resolve_relative_url(), which does confirm that argc is 3. The main reason this is a separate function is that it was moved from library code in 96a28a9bc6 (submodule--helper: move "resolve-relative-url-test" to a test-tool, 2022-09-01). We can make this code simpler and more obviously safe by just inlining the function in its caller. As a bonus, this silences a -Wunused-parameter warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>