]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
10 months agot: port helper/test-hashmap.c to unit-tests/t-hashmap.c
Ghanshyam Thakkar [Sat, 3 Aug 2024 13:34:49 +0000 (19:04 +0530)] 
t: port helper/test-hashmap.c to unit-tests/t-hashmap.c

helper/test-hashmap.c along with t0011-hashmap.sh test the hashmap.h
library. Migrate them to the unit testing framework for better
debugging, runtime performance and concise code.

Along with the migration, make 'add' tests from the shell script order
agnostic in unit tests, since they iterate over entries with the same
keys and we do not guarantee the order. This was already done for the
'iterate' tests[1].

The helper/test-hashmap.c is still not removed because it contains a
performance test meant to be run by the user directly (not used in
t/perf). And it makes sense for such a utility to be a helper.

[1]: e1e7a77141 (t: sort output of hashmap iteration, 2019-07-30)

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Mentored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Helped-by: Josh Steadmon <steadmon@google.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 months agoMerge https://github.com/j6t/git-gui
Junio C Hamano [Mon, 8 Jul 2024 05:50:37 +0000 (22:50 -0700)] 
Merge https://github.com/j6t/git-gui

* https://github.com/j6t/git-gui:
  git-gui: fix inability to quit after closing another instance
  git-gui: sv.po: Update Swedish translation (576t0f0u)
  git-gui: note the new maintainer
  Makefile(s): do not enforce "all indents must be done with tab"
  Makefile(s): avoid recipe prefix in conditional statements
  doc: switch links to https
  doc: update links to current pages
  git-gui: po: fix typo in French "aperçu"

11 months agoMerge branch 'os/catch-rename'
Johannes Sixt [Sun, 7 Jul 2024 12:00:23 +0000 (14:00 +0200)] 
Merge branch 'os/catch-rename'

The problem can be reproduced on Linux with this sequence:

1. Run git gui from a terminal.
2. Edit the commit message and wait for at least 2 seconds.
3. Terminate the instance from the terminal, for example with Ctrl-C,
   to simulate crash. This leaves the file .git/GITGUI_BCK behind.
4. Start two instances of git gui &.

At this point the first instance can be closed (it renames
.git/GITGUI_BCK to .git/GITGUI_MSG), but the seconds brings an error
message about the absent file and cannot be closed thereafter and must
be killed from the command line.

The renaming that happens by the first instance is the correct action
and need not be repeated by the second instance. It is the correct
action to ignore the failed renaming.

On the other hand, the second instance could just edit the commit
message again, wait 2 seconds to write GITGUI_BCK, and then can be
closed without failing. At this point, since the user has edited the
message, it is again correct to preserve the edited version in
GITGUI_MSG.

* os/catch-rename:
  git-gui: fix inability to quit after closing another instance

12 months agoSync with 'maint'
Junio C Hamano [Tue, 2 Jul 2024 16:59:24 +0000 (09:59 -0700)] 
Sync with 'maint'

12 months agoThe eighteenth batch
Junio C Hamano [Tue, 2 Jul 2024 16:34:47 +0000 (09:34 -0700)] 
The eighteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'rs/diff-color-moved-w-no-ext-diff-fix'
Junio C Hamano [Tue, 2 Jul 2024 16:59:02 +0000 (09:59 -0700)] 
Merge branch 'rs/diff-color-moved-w-no-ext-diff-fix'

"git diff --no-ext-diff" when diff.external is configured ignored
the "--color-moved" option.

* rs/diff-color-moved-w-no-ext-diff-fix:
  diff: allow --color-moved with --no-ext-diff

12 months agoMerge branch 'ew/object-convert-leakfix'
Junio C Hamano [Tue, 2 Jul 2024 16:59:01 +0000 (09:59 -0700)] 
Merge branch 'ew/object-convert-leakfix'

Leakfix.

* ew/object-convert-leakfix:
  object-file: fix leak on conversion failure

12 months agoMerge branch 'jk/remote-wo-url'
Junio C Hamano [Tue, 2 Jul 2024 16:59:01 +0000 (09:59 -0700)] 
Merge branch 'jk/remote-wo-url'

Memory ownership rules for the in-core representation of
remote.*.url configuration values have been straightened out, which
resulted in a few leak fixes and code clarification.

* jk/remote-wo-url:
  remote: drop checks for zero-url case
  remote: always require at least one url in a remote
  t5801: test remote.*.vcs config
  t5801: make remote-testgit GIT_DIR setup more robust
  remote: allow resetting url list
  config: document remote.*.url/pushurl interaction
  remote: simplify url/pushurl selection
  remote: use strvecs to store remote url/pushurl
  remote: transfer ownership of memory in add_url(), etc
  remote: refactor alias_url() memory ownership
  archive: fix check for missing url

12 months agoMerge branch 'jc/fuzz-sans-curl'
Junio C Hamano [Tue, 2 Jul 2024 16:59:01 +0000 (09:59 -0700)] 
Merge branch 'jc/fuzz-sans-curl'

CI job to build minimum fuzzers learned to pass NO_CURL=NoThanks to
the build procedure, as its build environment does not offer, or
the rest of the build needs, anything cURL.

* jc/fuzz-sans-curl:
  fuzz: minimum fuzzers environment lacks libcURL

12 months agoMerge branch 'rb/build-options-w-lib-versions'
Junio C Hamano [Tue, 2 Jul 2024 16:59:00 +0000 (09:59 -0700)] 
Merge branch 'rb/build-options-w-lib-versions'

"git version --build-options" reports the version information of
OpenSSL and other libraries (if used) in the build.

* rb/build-options-w-lib-versions:
  version: teach --build-options to reports zlib version information
  version: teach --build-options to reports libcurl version information
  version: --build-options reports OpenSSL version information

12 months agoMerge branch 'ps/use-the-repository'
Junio C Hamano [Tue, 2 Jul 2024 16:59:00 +0000 (09:59 -0700)] 
Merge branch 'ps/use-the-repository'

A CPP macro USE_THE_REPOSITORY_VARIABLE is introduced to help
transition the codebase to rely less on the availability of the
singleton the_repository instance.

* ps/use-the-repository:
  hex: guard declarations with `USE_THE_REPOSITORY_VARIABLE`
  t/helper: remove dependency on `the_repository` in "proc-receive"
  t/helper: fix segfault in "oid-array" command without repository
  t/helper: use correct object hash in partial-clone helper
  compat/fsmonitor: fix socket path in networked SHA256 repos
  replace-object: use hash algorithm from passed-in repository
  protocol-caps: use hash algorithm from passed-in repository
  oidset: pass hash algorithm when parsing file
  http-fetch: don't crash when parsing packfile without a repo
  hash-ll: merge with "hash.h"
  refs: avoid include cycle with "repository.h"
  global: introduce `USE_THE_REPOSITORY_VARIABLE` macro
  hash: require hash algorithm in `empty_tree_oid_hex()`
  hash: require hash algorithm in `is_empty_{blob,tree}_oid()`
  hash: make `is_null_oid()` independent of `the_repository`
  hash: convert `oidcmp()` and `oideq()` to compare whole hash
  global: ensure that object IDs are always padded
  hash: require hash algorithm in `oidread()` and `oidclr()`
  hash: require hash algorithm in `hasheq()`, `hashcmp()` and `hashclr()`
  hash: drop (mostly) unused `is_empty_{blob,tree}_sha1()` functions

12 months agoMerge branch 'ew/cat-file-unbuffered-tests'
Junio C Hamano [Tue, 2 Jul 2024 16:58:59 +0000 (09:58 -0700)] 
Merge branch 'ew/cat-file-unbuffered-tests'

The output from "git cat-file --batch-check" and "--batch-command
(info)" should not be unbuffered, for which some tests have been
added.

* ew/cat-file-unbuffered-tests:
  t1006: ensure cat-file info isn't buffered by default
  Git.pm: use array in command_bidi_pipe example

12 months agoYet another batch of post 2.45.2 updates from the 'master' front
Junio C Hamano [Tue, 2 Jul 2024 16:04:10 +0000 (09:04 -0700)] 
Yet another batch of post 2.45.2 updates from the 'master' front

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'rs/remove-unused-find-header-mem' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:59 +0000 (09:27 -0700)] 
Merge branch 'rs/remove-unused-find-header-mem' into maint-2.45

Code clean-up.

* rs/remove-unused-find-header-mem:
  commit: remove find_header_mem()

12 months agoMerge branch 'jc/worktree-git-path' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:58 +0000 (09:27 -0700)] 
Merge branch 'jc/worktree-git-path' into maint-2.45

Code cleanup.

* jc/worktree-git-path:
  worktree_git_path(): move the declaration to path.h

12 months agoMerge branch 'jk/fetch-pack-fsck-wo-lock-pack' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:58 +0000 (09:27 -0700)] 
Merge branch 'jk/fetch-pack-fsck-wo-lock-pack' into maint-2.45

"git fetch-pack -k -k" without passing "--lock-pack" (which we
never do ourselves) did not work at all, which has been corrected.

* jk/fetch-pack-fsck-wo-lock-pack:
  fetch-pack: fix segfault when fscking without --lock-pack

12 months agoMerge branch 'jk/t5500-typofix' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:58 +0000 (09:27 -0700)] 
Merge branch 'jk/t5500-typofix' into maint-2.45

A helper function shared between two tests had a copy-paste bug,
which has been corrected.

* jk/t5500-typofix:
  t5500: fix mistaken $SERVER reference in helper function

12 months agoMerge branch 'js/mingw-remove-unused-extern-decl' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:57 +0000 (09:27 -0700)] 
Merge branch 'js/mingw-remove-unused-extern-decl' into maint-2.45

An unused extern declaration for mingw has been removed to prevent
it from causing build failure.

* js/mingw-remove-unused-extern-decl:
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`

12 months agoMerge branch 'jc/no-default-attr-tree-in-bare' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:57 +0000 (09:27 -0700)] 
Merge branch 'jc/no-default-attr-tree-in-bare' into maint-2.45

Earlier we stopped using the tree of HEAD as the default source of
attributes in a bare repository, but failed to document it.  This
has been corrected.

* jc/no-default-attr-tree-in-bare:
  attr.tree: HEAD:.gitattributes is no longer the default in a bare repo

12 months agoMerge branch 'tb/precompose-getcwd' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:56 +0000 (09:27 -0700)] 
Merge branch 'tb/precompose-getcwd' into maint-2.45

We forgot to normalize the result of getcwd() to NFC on macOS where
all other paths are normalized, which has been corrected.  This still
does not address the case where core.precomposeUnicode configuration
is not defined globally.

* tb/precompose-getcwd:
  macOS: ls-files path fails if path of workdir is NFD

12 months agoMerge branch 'pw/rebase-i-error-message' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:56 +0000 (09:27 -0700)] 
Merge branch 'pw/rebase-i-error-message' into maint-2.45

When the user adds to "git rebase -i" instruction to "pick" a merge
commit, the error experience is not pleasant.  Such an error is now
caught earlier in the process that parses the todo list.

* pw/rebase-i-error-message:
  rebase -i: improve error message when picking merge
  rebase -i: pass struct replay_opts to parse_insn_line()

12 months agoMerge branch 'ds/format-patch-rfc-and-k' into maint-2.45
Junio C Hamano [Tue, 2 Jul 2024 16:27:55 +0000 (09:27 -0700)] 
Merge branch 'ds/format-patch-rfc-and-k' into maint-2.45

The "-k" and "--rfc" options of "format-patch" will now error out
when used together, as one tells us not to add anything to the
title of the commit, and the other one tells us to add "RFC" in
addition to "PATCH".

* ds/format-patch-rfc-and-k:
  format-patch: ensure that --rfc and -k are mutually exclusive

12 months agogit-gui: fix inability to quit after closing another instance
Orgad Shaneh [Tue, 7 Feb 2023 07:43:17 +0000 (09:43 +0200)] 
git-gui: fix inability to quit after closing another instance

If you open 2 git gui instances in the same directory, then close one
of them and try to close the other, an error message pops up, saying:
'error renaming ".git/GITGUI_BCK": no such file or directory', and it
is no longer possible to close the window ever.

Fix by catching this error, and proceeding even if the file no longer
exists.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
12 months agoSync with 'maint'
Junio C Hamano [Fri, 28 Jun 2024 23:03:59 +0000 (16:03 -0700)] 
Sync with 'maint'

12 months agoMore post 2.45.2 updates from the 'master' front
Junio C Hamano [Fri, 28 Jun 2024 22:09:40 +0000 (15:09 -0700)] 
More post 2.45.2 updates from the 'master' front

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'ds/ahead-behind-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:19 +0000 (15:53 -0700)] 
Merge branch 'ds/ahead-behind-fix' into maint-2.45

Fix for a progress bar.

* ds/ahead-behind-fix:
  commit-graph: increment progress indicator

12 months agoMerge branch 'ds/doc-add-interactive-singlekey' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:18 +0000 (15:53 -0700)] 
Merge branch 'ds/doc-add-interactive-singlekey' into maint-2.45

Doc update.

* ds/doc-add-interactive-singlekey:
  doc: interactive.singleKey is disabled by default

12 months agoMerge branch 'jc/varargs-attributes' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:18 +0000 (15:53 -0700)] 
Merge branch 'jc/varargs-attributes' into maint-2.45

Varargs functions that are unannotated as printf-like or execl-like
have been annotated as such.

* jc/varargs-attributes:
  __attribute__: add a few missing format attributes
  __attribute__: mark some functions with LAST_ARG_MUST_BE_NULL
  __attribute__: remove redundant attribute declaration for git_die_config()
  __attribute__: trace2_region_enter_printf() is like "printf"

12 months agoMerge branch 'ps/ci-fix-detection-of-ubuntu-20' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:17 +0000 (15:53 -0700)] 
Merge branch 'ps/ci-fix-detection-of-ubuntu-20' into maint-2.45

Fix for an embarrassing typo that prevented Python2 tests from running
anywhere.

* ps/ci-fix-detection-of-ubuntu-20:
  ci: fix check for Ubuntu 20.04

12 months agoMerge branch 'jk/cap-exclude-file-size' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:17 +0000 (15:53 -0700)] 
Merge branch 'jk/cap-exclude-file-size' into maint-2.45

An overly large ".gitignore" files are now rejected silently.

* jk/cap-exclude-file-size:
  dir.c: reduce max pattern file size to 100MB
  dir.c: skip .gitignore, etc larger than INT_MAX

12 months agoMerge branch 'jc/safe-directory-leading-path' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:16 +0000 (15:53 -0700)] 
Merge branch 'jc/safe-directory-leading-path' into maint-2.45

The safe.directory configuration knob has been updated to
optionally allow leading path matches.

* jc/safe-directory-leading-path:
  safe.directory: allow "lead/ing/path/*" match

12 months agoMerge branch 'rs/difftool-env-simplify' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:16 +0000 (15:53 -0700)] 
Merge branch 'rs/difftool-env-simplify' into maint-2.45

Code simplification.

* rs/difftool-env-simplify:
  difftool: add env vars directly in run_file_diff()

12 months agoMerge branch 'ps/fix-reinit-includeif-onbranch' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:15 +0000 (15:53 -0700)] 
Merge branch 'ps/fix-reinit-includeif-onbranch' into maint-2.45

"git init" in an already created directory, when the user
configuration has includeif.onbranch, started to fail recently,
which has been corrected.

* ps/fix-reinit-includeif-onbranch:
  setup: fix bug with "includeIf.onbranch" when initializing dir

12 months agoMerge branch 'es/chainlint-ncores-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:15 +0000 (15:53 -0700)] 
Merge branch 'es/chainlint-ncores-fix' into maint-2.45

The chainlint script (invoked during "make test") did nothing when
it failed to detect the number of available CPUs.  It now falls
back to 1 CPU to avoid the problem.

* es/chainlint-ncores-fix:
  chainlint.pl: latch CPU count directly reported by /proc/cpuinfo
  chainlint.pl: fix incorrect CPU count on Linux SPARC
  chainlint.pl: make CPU count computation more robust

12 months agoMerge branch 'jc/rev-parse-fatal-doc' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:14 +0000 (15:53 -0700)] 
Merge branch 'jc/rev-parse-fatal-doc' into maint-2.45

Doc update.

* jc/rev-parse-fatal-doc:
  rev-parse: document how --is-* options work outside a repository

12 months agoMerge branch 'jc/doc-diff-name-only' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:14 +0000 (15:53 -0700)] 
Merge branch 'jc/doc-diff-name-only' into maint-2.45

The documentation for "git diff --name-only" has been clarified
that it is about showing the names in the post-image tree.

* jc/doc-diff-name-only:
  diff: document what --name-only shows

12 months agoMerge branch 'mt/t0211-typofix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:13 +0000 (15:53 -0700)] 
Merge branch 'mt/t0211-typofix' into maint-2.45

Test fix.

* mt/t0211-typofix:
  t/t0211-trace2-perf.sh: fix typo patern -> pattern

12 months agoMerge branch 'dg/fetch-pack-code-cleanup' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:13 +0000 (15:53 -0700)] 
Merge branch 'dg/fetch-pack-code-cleanup' into maint-2.45

Code clean-up to remove an unused struct definition.

* dg/fetch-pack-code-cleanup:
  fetch-pack: remove unused 'struct loose_object_iter'

12 months agoMerge branch 'dm/update-index-doc-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:12 +0000 (15:53 -0700)] 
Merge branch 'dm/update-index-doc-fix' into maint-2.45

Doc fix.

* dm/update-index-doc-fix:
  documentation: git-update-index: add --show-index-version to synopsis

12 months agoMerge branch 'ds/scalar-reconfigure-all-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:12 +0000 (15:53 -0700)] 
Merge branch 'ds/scalar-reconfigure-all-fix' into maint-2.45

Scalar fix.

* ds/scalar-reconfigure-all-fix:
  scalar: avoid segfault in reconfigure --all

12 months agoMerge branch 'vd/doc-merge-tree-x-option' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:11 +0000 (15:53 -0700)] 
Merge branch 'vd/doc-merge-tree-x-option' into maint-2.45

Doc update.

* vd/doc-merge-tree-x-option:
  Documentation/git-merge-tree.txt: document -X

12 months agoMerge branch 'fa/p4-error' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:10 +0000 (15:53 -0700)] 
Merge branch 'fa/p4-error' into maint-2.45

P4 update.

* fa/p4-error:
  git-p4: show Perforce error to the user

12 months agoMerge branch 'tb/attr-limits' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:10 +0000 (15:53 -0700)] 
Merge branch 'tb/attr-limits' into maint-2.45

The maximum size of attribute files is enforced more consistently.

* tb/attr-limits:
  attr.c: move ATTR_MAX_FILE_SIZE check into read_attr_from_buf()

12 months agoMerge branch 'rs/diff-parseopts-cleanup' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:09 +0000 (15:53 -0700)] 
Merge branch 'rs/diff-parseopts-cleanup' into maint-2.45

Code clean-up to remove code that is now a noop.

* rs/diff-parseopts-cleanup:
  diff-lib: stop calling diff_setup_done() in do_diff_cache()

12 months agoMerge branch 'dk/zsh-git-repo-path-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:09 +0000 (15:53 -0700)] 
Merge branch 'dk/zsh-git-repo-path-fix' into maint-2.45

Command line completion support for zsh (in contrib/) has been
updated to stop exposing internal state to end-user shell
interaction.

* dk/zsh-git-repo-path-fix:
  completion: zsh: stop leaking local cache variable

12 months agoMerge branch 'bc/zsh-compatibility' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:08 +0000 (15:53 -0700)] 
Merge branch 'bc/zsh-compatibility' into maint-2.45

zsh can pretend to be a normal shell pretty well except for some
glitches that we tickle in some of our scripts. Work them around
so that "vimdiff" and our test suite works well enough with it.

* bc/zsh-compatibility:
  vimdiff: make script and tests work with zsh
  t4046: avoid continue in &&-chain for zsh

12 months agoMerge branch 'js/for-each-repo-keep-going' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:08 +0000 (15:53 -0700)] 
Merge branch 'js/for-each-repo-keep-going' into maint-2.45

A scheduled "git maintenance" job is expected to work on all
repositories it knows about, but it stopped at the first one that
errored out.  Now it keeps going.

* js/for-each-repo-keep-going:
  maintenance: running maintenance should not stop on errors
  for-each-repo: optionally keep going on an error

12 months agoMerge branch 'aj/stash-staged-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:07 +0000 (15:53 -0700)] 
Merge branch 'aj/stash-staged-fix' into maint-2.45

"git stash -S" did not handle binary files correctly, which has
been corrected.

* aj/stash-staged-fix:
  stash: fix "--staged" with binary files

12 months agoMerge branch 'xx/disable-replace-when-building-midx' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:06 +0000 (15:53 -0700)] 
Merge branch 'xx/disable-replace-when-building-midx' into maint-2.45

The procedure to build multi-pack-index got confused by the
replace-refs mechanism, which has been corrected by disabling the
latter.

* xx/disable-replace-when-building-midx:
  midx: disable replace objects

12 months agoMerge branch 'pw/rebase-m-signoff-fix' into maint-2.45
Junio C Hamano [Fri, 28 Jun 2024 22:53:06 +0000 (15:53 -0700)] 
Merge branch 'pw/rebase-m-signoff-fix' into maint-2.45

"git rebase --signoff" used to forget that it needs to add a
sign-off to the resulting commit when told to continue after a
conflict stops its operation.

* pw/rebase-m-signoff-fix:
  rebase -m: fix --signoff with conflicts
  sequencer: store commit message in private context
  sequencer: move current fixups to private context
  sequencer: start removing private fields from public API
  sequencer: always free "struct replay_opts"

12 months agoThe seventeenth batch
Junio C Hamano [Thu, 27 Jun 2024 16:19:35 +0000 (09:19 -0700)] 
The seventeenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'jk/fetch-pack-fsck-wo-lock-pack'
Junio C Hamano [Thu, 27 Jun 2024 16:19:59 +0000 (09:19 -0700)] 
Merge branch 'jk/fetch-pack-fsck-wo-lock-pack'

"git fetch-pack -k -k" without passing "--lock-pack" (which we
never do ourselves) did not work at all, which has been corrected.

* jk/fetch-pack-fsck-wo-lock-pack:
  fetch-pack: fix segfault when fscking without --lock-pack

12 months agoMerge branch 'rs/remove-unused-find-header-mem'
Junio C Hamano [Thu, 27 Jun 2024 16:19:59 +0000 (09:19 -0700)] 
Merge branch 'rs/remove-unused-find-header-mem'

Code clean-up.

* rs/remove-unused-find-header-mem:
  commit: remove find_header_mem()

12 months agoMerge branch 'jk/t5500-typofix'
Junio C Hamano [Thu, 27 Jun 2024 16:19:58 +0000 (09:19 -0700)] 
Merge branch 'jk/t5500-typofix'

A helper function shared between two tests had a copy-paste bug,
which has been corrected.

* jk/t5500-typofix:
  t5500: fix mistaken $SERVER reference in helper function

12 months agoMerge branch 'js/mingw-remove-unused-extern-decl'
Junio C Hamano [Thu, 27 Jun 2024 16:19:58 +0000 (09:19 -0700)] 
Merge branch 'js/mingw-remove-unused-extern-decl'

An unused extern declaration for mingw has been removed to prevent
it from causing build failure.

* js/mingw-remove-unused-extern-decl:
  mingw: drop bogus (and unneeded) declaration of `_pgmptr`

12 months agoMerge branch 'kz/merge-fail-early-upon-refresh-failure'
Junio C Hamano [Thu, 27 Jun 2024 16:19:58 +0000 (09:19 -0700)] 
Merge branch 'kz/merge-fail-early-upon-refresh-failure'

When "git merge" sees that the index cannot be refreshed (e.g. due
to another process doing the same in the background), it died but
after writing MERGE_HEAD etc. files, which was useless for the
purpose to recover from the failure.

* kz/merge-fail-early-upon-refresh-failure:
  merge: avoid write merge state when unable to write index

12 months agoThe sixteenth batch
Junio C Hamano [Mon, 24 Jun 2024 22:02:54 +0000 (15:02 -0700)] 
The sixteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'kl/attr-read-attr-fromindex-msan-workaround'
Junio C Hamano [Mon, 24 Jun 2024 23:39:15 +0000 (16:39 -0700)] 
Merge branch 'kl/attr-read-attr-fromindex-msan-workaround'

Code clarification to avoid an appearance of using an uninitialized
variable.

* kl/attr-read-attr-fromindex-msan-workaround:
  attr: fix msan issue in read_attr_from_index

12 months agoMerge branch 'jc/worktree-git-path'
Junio C Hamano [Mon, 24 Jun 2024 23:39:15 +0000 (16:39 -0700)] 
Merge branch 'jc/worktree-git-path'

Code cleanup.

* jc/worktree-git-path:
  worktree_git_path(): move the declaration to path.h

12 months agoMerge branch 'tb/commit-graph-use-tempfile'
Junio C Hamano [Mon, 24 Jun 2024 23:39:15 +0000 (16:39 -0700)] 
Merge branch 'tb/commit-graph-use-tempfile'

"git update-server-info" and "git commit-graph --write" have been
updated to use the tempfile API to avoid leaving cruft after
failing.

* tb/commit-graph-use-tempfile:
  server-info.c: remove temporary info files on exit
  commit-graph.c: remove temporary graph layers on exit

12 months agoMerge branch 'jc/add-i-retire-usebuiltin-config'
Junio C Hamano [Mon, 24 Jun 2024 23:39:14 +0000 (16:39 -0700)] 
Merge branch 'jc/add-i-retire-usebuiltin-config'

For over a year, setting add.interactive.useBuiltin configuration
variable did nothing but giving a "this does not do anything"
warning.  Finally remove it.

* jc/add-i-retire-usebuiltin-config:
  add-i: finally retire add.interactive.useBuiltin

12 months agoMerge branch 'jc/no-default-attr-tree-in-bare'
Junio C Hamano [Mon, 24 Jun 2024 23:39:14 +0000 (16:39 -0700)] 
Merge branch 'jc/no-default-attr-tree-in-bare'

Earlier we stopped using the tree of HEAD as the default source of
attributes in a bare repository, but failed to document it.  This
has been corrected.

* jc/no-default-attr-tree-in-bare:
  attr.tree: HEAD:.gitattributes is no longer the default in a bare repo

12 months agoMerge branch 'tb/precompose-getcwd'
Junio C Hamano [Mon, 24 Jun 2024 23:39:13 +0000 (16:39 -0700)] 
Merge branch 'tb/precompose-getcwd'

We forgot to normalize the result of getcwd() to NFC on macOS where
all other paths are normalized, which has been corrected.  This still
does not address the case where core.precomposeUnicode configuration
is not defined globally.

* tb/precompose-getcwd:
  macOS: ls-files path fails if path of workdir is NFD

12 months agoMerge branch 'tb/pseudo-merge-reachability-bitmap'
Junio C Hamano [Mon, 24 Jun 2024 23:39:13 +0000 (16:39 -0700)] 
Merge branch 'tb/pseudo-merge-reachability-bitmap'

The pseudo-merge reachability bitmap to help more efficient storage
of the reachability bitmap in a repository with too many refs has
been added.

* tb/pseudo-merge-reachability-bitmap: (26 commits)
  pack-bitmap.c: ensure pseudo-merge offset reads are bounded
  Documentation/technical/bitmap-format.txt: add missing position table
  t/perf: implement performance tests for pseudo-merge bitmaps
  pseudo-merge: implement support for finding existing merges
  ewah: `bitmap_equals_ewah()`
  pack-bitmap: extra trace2 information
  pack-bitmap.c: use pseudo-merges during traversal
  t/test-lib-functions.sh: support `--notick` in `test_commit_bulk()`
  pack-bitmap: implement test helpers for pseudo-merge
  ewah: implement `ewah_bitmap_popcount()`
  pseudo-merge: implement support for reading pseudo-merge commits
  pack-bitmap.c: read pseudo-merge extension
  pseudo-merge: scaffolding for reads
  pack-bitmap: extract `read_bitmap()` function
  pack-bitmap-write.c: write pseudo-merge table
  pseudo-merge: implement support for selecting pseudo-merge commits
  config: introduce `git_config_double()`
  pack-bitmap: make `bitmap_writer_push_bitmapped_commit()` public
  pack-bitmap: implement `bitmap_writer_has_bitmapped_object_id()`
  pack-bitmap-write: support storing pseudo-merge commits
  ...

12 months agodiff: allow --color-moved with --no-ext-diff
René Scharfe [Mon, 24 Jun 2024 19:15:45 +0000 (21:15 +0200)] 
diff: allow --color-moved with --no-ext-diff

We ignore the option --color-moved if an external diff program is
configured, presumably because its overhead is unnecessary in that case.
Respect the option if we don't actually use the external diff, though.

Reported-by: lolligerhans@gmx.de
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoobject-file: fix leak on conversion failure
Eric Wong [Sat, 22 Jun 2024 04:36:48 +0000 (04:36 +0000)] 
object-file: fix leak on conversion failure

I'm not sure exactly how to trigger the leak, but it seems fairly
obvious that the `content' buffer should be freed even if
convert_object_file() fails.  Noticed while working in this area
on unrelated things.

Signed-off-by: Eric Wong <e@80x24.org>
Acked-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'pk/swedish-translation'
Johannes Sixt [Sun, 23 Jun 2024 08:25:57 +0000 (10:25 +0200)] 
Merge branch 'pk/swedish-translation'

* pk/swedish-translation:
  git-gui: sv.po: Update Swedish translation (576t0f0u)

12 months agoMerge branch 'bc/french-translation'
Johannes Sixt [Sun, 23 Jun 2024 08:25:41 +0000 (10:25 +0200)] 
Merge branch 'bc/french-translation'

* bc/french-translation:
  git-gui: po: fix typo in French "aperçu"

12 months agofuzz: minimum fuzzers environment lacks libcURL
Junio C Hamano [Sat, 22 Jun 2024 05:08:42 +0000 (22:08 -0700)] 
fuzz: minimum fuzzers environment lacks libcURL

The "fuzz smoke test" job compiles various .o files to create
libgit.a and others, but the final build product of the fuzzer build
is *not* "git".  Since the job is not interested in building a
working "git", it does not define any build flags, and among the
notable ones that are missing is NO_CURL---even though the CI
environment that runs the job does not have libcURL development
package installed.

This obviously leads to a build failure.

Pass NO_CURL=NoThanks to "make" to make sure things will build
correctly, if we add any conditional compilation with "#ifdef
NO_CURL ... #endif" in the codebase.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoversion: teach --build-options to reports zlib version information
Randall S. Becker [Fri, 21 Jun 2024 18:09:47 +0000 (14:09 -0400)] 
version: teach --build-options to reports zlib version information

Show ZLIB_VERSION, if defined, in "git version --build-options"
output.

Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoversion: teach --build-options to reports libcurl version information
Randall S. Becker [Fri, 21 Jun 2024 18:09:46 +0000 (14:09 -0400)] 
version: teach --build-options to reports libcurl version information

Show LIBCURL_VERSION, if defined, in "git version --build-options"
output.

Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoThe fifteenth batch
Junio C Hamano [Thu, 20 Jun 2024 22:44:51 +0000 (15:44 -0700)] 
The fifteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'jc/heads-are-branches'
Junio C Hamano [Thu, 20 Jun 2024 22:45:16 +0000 (15:45 -0700)] 
Merge branch 'jc/heads-are-branches'

The "--heads" option of "ls-remote" and "show-ref" has been been
deprecated; "--branches" replaces "--heads".

* jc/heads-are-branches:
  show-ref: introduce --branches and deprecate --heads
  ls-remote: introduce --branches and deprecate --heads
  refs: call branches branches

12 months agoMerge branch 'ps/document-breaking-changes'
Junio C Hamano [Thu, 20 Jun 2024 22:45:16 +0000 (15:45 -0700)] 
Merge branch 'ps/document-breaking-changes'

The structure of the document that records longer-term project
decisions to deprecate/remove/update various behaviour has been
outlined.

* ps/document-breaking-changes:
  BreakingChanges: document that we do not plan to deprecate git-checkout
  BreakingChanges: document removal of grafting
  BreakingChanges: document upcoming change from "sha1" to "sha256"
  docs: introduce document to announce breaking changes

12 months agoMerge branch 'pw/rebase-i-error-message'
Junio C Hamano [Thu, 20 Jun 2024 22:45:15 +0000 (15:45 -0700)] 
Merge branch 'pw/rebase-i-error-message'

When the user adds to "git rebase -i" instruction to "pick" a merge
commit, the error experience is not pleasant.  Such an error is now
caught earlier in the process that parses the todo list.

* pw/rebase-i-error-message:
  rebase -i: improve error message when picking merge
  rebase -i: pass struct replay_opts to parse_insn_line()

12 months agoMerge branch 'ds/ahead-behind-fix'
Junio C Hamano [Thu, 20 Jun 2024 22:45:14 +0000 (15:45 -0700)] 
Merge branch 'ds/ahead-behind-fix'

Fix for a progress bar.

* ds/ahead-behind-fix:
  commit-graph: increment progress indicator

12 months agoMerge branch 'ps/abbrev-length-before-setup-fix'
Junio C Hamano [Thu, 20 Jun 2024 22:45:13 +0000 (15:45 -0700)] 
Merge branch 'ps/abbrev-length-before-setup-fix'

Setting core.abbrev too early before the repository set-up
(typically in "git clone") caused segfault, which as been
corrected.

* ps/abbrev-length-before-setup-fix:
  object-name: don't try to abbreviate to lengths greater than hexsz
  parse-options-cb: stop clamping "--abbrev=" to hash length
  config: fix segfault when parsing "core.abbrev" without repo

12 months agoMerge branch 'rj/format-patch-auto-cover-with-interdiff'
Junio C Hamano [Thu, 20 Jun 2024 22:45:12 +0000 (15:45 -0700)] 
Merge branch 'rj/format-patch-auto-cover-with-interdiff'

"git format-patch --interdiff" for multi-patch series learned to
turn on cover letters automatically (unless told never to enable
cover letter with "--no-cover-letter" and such).

* rj/format-patch-auto-cover-with-interdiff:
  format-patch: assume --cover-letter for diff in multi-patch series
  t4014: cleanups in a few tests

12 months agoMerge branch 'kn/update-ref-symref'
Junio C Hamano [Thu, 20 Jun 2024 22:45:11 +0000 (15:45 -0700)] 
Merge branch 'kn/update-ref-symref'

"git update-ref --stdin" learned to handle transactional updates of
symbolic-refs.

* kn/update-ref-symref:
  update-ref: add support for 'symref-update' command
  reftable: pick either 'oid' or 'target' for new updates
  update-ref: add support for 'symref-create' command
  update-ref: add support for 'symref-delete' command
  update-ref: add support for 'symref-verify' command
  refs: specify error for regular refs with `old_target`
  refs: create and use `ref_update_expects_existing_old_ref()`

12 months agoMerge branch 'gt/unit-test-oidtree'
Junio C Hamano [Thu, 20 Jun 2024 22:45:10 +0000 (15:45 -0700)] 
Merge branch 'gt/unit-test-oidtree'

"oidtree" tests were rewritten to use the unit test framework.

* gt/unit-test-oidtree:
  t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c

12 months agoMerge branch 'tb/multi-pack-reuse-fix'
Junio C Hamano [Thu, 20 Jun 2024 22:45:09 +0000 (15:45 -0700)] 
Merge branch 'tb/multi-pack-reuse-fix'

Assorted fixes to multi-pack-index code paths.

* tb/multi-pack-reuse-fix:
  pack-revindex.c: guard against out-of-bounds pack lookups
  pack-bitmap.c: avoid uninitialized `pack_int_id` during reuse
  midx-write.c: do not read existing MIDX with `packs_to_include`

12 months agoMerge branch 'ps/make-append-to-cflags'
Junio C Hamano [Thu, 20 Jun 2024 22:45:09 +0000 (15:45 -0700)] 
Merge branch 'ps/make-append-to-cflags'

To help developers, the build procedure now allows builders to use
CFLAGS_APPEND to specify additional CFLAGS.

* ps/make-append-to-cflags:
  Makefile: add ability to append to CFLAGS and LDFLAGS

12 months agoMerge branch 'rs/diff-exit-code-with-external-diff'
Junio C Hamano [Thu, 20 Jun 2024 22:45:08 +0000 (15:45 -0700)] 
Merge branch 'rs/diff-exit-code-with-external-diff'

"git diff --exit-code --ext-diff" learned to take the exit status
of the external diff driver into account when deciding the exit
status of the overall "git diff" invocation when configured to do
so.

* rs/diff-exit-code-with-external-diff:
  diff: let external diffs report that changes are uninteresting
  userdiff: add and use struct external_diff
  t4020: test exit code with external diffs

12 months agoMerge branch 'ds/doc-add-interactive-singlekey'
Junio C Hamano [Thu, 20 Jun 2024 22:45:07 +0000 (15:45 -0700)] 
Merge branch 'ds/doc-add-interactive-singlekey'

Doc update.

* ds/doc-add-interactive-singlekey:
  doc: interactive.singleKey is disabled by default

12 months agoversion: --build-options reports OpenSSL version information
Randall S. Becker [Wed, 19 Jun 2024 17:24:21 +0000 (13:24 -0400)] 
version: --build-options reports OpenSSL version information

This change uses the OpenSSL supplied OPENSSL_VERSION_TEXT #define supplied
for this purpose by that project. If the #define is not present, the version
is not reported.

Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agocommit: remove find_header_mem()
René Scharfe [Wed, 19 Jun 2024 17:13:19 +0000 (19:13 +0200)] 
commit: remove find_header_mem()

cfc5cf428b (receive-pack.c: consolidate find header logic, 2022-01-06)
introduced find_header_mem() and turned find_commit_header() into a thin
wrapper.  Since then, the latter has become the last remaining caller of
the former.  Remove it to restore find_commit_header() to the state
before cfc5cf428b, get rid of a strlen(3) call and resolve a NEEDSWORK
note in the process.

Signed-off-by: René Scharfe <l.s.r@web.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agot5500: fix mistaken $SERVER reference in helper function
Jeff King [Wed, 19 Jun 2024 12:52:55 +0000 (08:52 -0400)] 
t5500: fix mistaken $SERVER reference in helper function

The end of t5500 contains two tests which use a single helper function,
fetch_filter_blob_limit_zero(). It takes a parameter to point to the
path of the server repository, which we store locally as $SERVER. The
first caller uses the relative path "server", while the second points
into the httpd document root.

Commit 07ef3c6604 (fetch test: use more robust test for filtered
objects, 2019-12-23) refactored some lines, but accidentally switched
"$SERVER" to "server" in one spot. That means the second caller is
looking at the server directory from the previous test rather than its
own.

This happens to work out because the "server" directory from the first
test is still hanging around, and the contents of the two are identical.
But it was clearly not the intended behavior, and is fragile to cleaning
up the leftovers from the first test.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agomingw: drop bogus (and unneeded) declaration of `_pgmptr`
Johannes Schindelin [Wed, 19 Jun 2024 06:09:58 +0000 (06:09 +0000)] 
mingw: drop bogus (and unneeded) declaration of `_pgmptr`

In 08809c09aa13 (mingw: add a helper function to attach GDB to the
current process, 2020-02-13), I added a declaration that was not needed.
Back then, that did not matter, but now that the declaration of that
symbol was changed in mingw-w64's headers, it causes the following
compile error:

      CC compat/mingw.o
  compat/mingw.c: In function 'open_in_gdb':
  compat/mingw.c:35:9: error: function declaration isn't a prototype [-Werror=strict-prototypes]
     35 |         extern char *_pgmptr;
        |         ^~~~~~
  In file included from C:/git-sdk-64/usr/src/git/build-installers/mingw64/lib/gcc/x86_64-w64-mingw32/14.1.0/include/mm_malloc.h:27,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/lib/gcc/x86_64-w64-mingw32/14.1.0/include/xmmintrin.h:34,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/lib/gcc/x86_64-w64-mingw32/14.1.0/include/immintrin.h:31,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/lib/gcc/x86_64-w64-mingw32/14.1.0/include/x86intrin.h:32,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/include/winnt.h:1658,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/include/minwindef.h:163,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/include/windef.h:9,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/include/windows.h:69,
                   from C:/git-sdk-64/usr/src/git/build-installers/mingw64/include/winsock2.h:23,
                   from compat/../git-compat-util.h:215,
                   from compat/mingw.c:1:
  compat/mingw.c:35:22: error: '__p__pgmptr' redeclared without dllimport attribute: previous dllimport ignored [-Werror=attributes]
     35 |         extern char *_pgmptr;
        |                      ^~~~~~~

Let's just drop the declaration and get rid of this compile error.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agofetch-pack: fix segfault when fscking without --lock-pack
Jeff King [Wed, 19 Jun 2024 13:02:56 +0000 (09:02 -0400)] 
fetch-pack: fix segfault when fscking without --lock-pack

The fetch-pack internals have multiple options related to creating
".keep" lock-files for the received pack:

  - if args.lock_pack is set, then we tell index-pack to create a .keep
    file. In the fetch-pack plumbing command, this is triggered by
    passing "-k" twice.

  - if the caller passes in a pack_lockfiles string list, then we use it
    to record the path of the keep-file created by index-pack. We get
    that name by reading the stdout of index-pack. In the fetch-pack
    command, this is triggered by passing the (undocumented) --lock-pack
    option; without it, we pass in a NULL string list.

So it's possible to ask index-pack to create the lock-file (using "-k
-k") but not ask to record it (by avoiding "--lock-pack"). This worked
fine until 5476e1efde (fetch-pack: print and use dangling .gitmodules,
2021-02-22), but now it causes a segfault.

Before that commit, if pack_lockfiles was NULL, we wouldn't bother
reading the output from index-pack at all. But since that commit,
index-pack may produce extra output if we asked it to fsck. So even if
nobody cares about the lockfile path, we still need to read it to skip
to the output we do care about.

We correctly check that we didn't get a NULL lockfile path (which can
happen if we did not ask it to create a .keep file at all), but we
missed the case where the lockfile path is not NULL (due to "-k -k") but
the pack_lockfiles string_list is NULL (because nobody passed
"--lock-pack"), and segfault trying to add to the NULL string-list.

We can fix this by skipping the append to the string list when either
the value or the list is NULL. In that case we must also free the
lockfile path to avoid leaking it when it's non-NULL.

Nobody noticed the bug for so long because the transport code used by
"git fetch" always passes in a pack_lockfiles pointer, and remote-curl
(the main user of the fetch-pack plumbing command) always passes
--lock-pack.

Reported-by: Kirill Smelkov <kirr@nexedi.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agot1006: ensure cat-file info isn't buffered by default
Eric Wong [Tue, 18 Jun 2024 21:30:41 +0000 (21:30 +0000)] 
t1006: ensure cat-file info isn't buffered by default

While working on buffering changes to `git cat-file' in a
separate patch, I inadvertently made the output of --batch-check
and the `info' command of --batch-command buffered as if
opt->buffer_output is turned on by default.

Buffering by default breaks some 3rd-party Perl scripts using
cat-file, but this breakage was not detected anywhere in our
test suite.  Add a small Perl snippet to test this problem since
(AFAIK) other equivalent ways to test this behavior from Bourne
shell and/or awk would require racy sleeps, non-portable FIFOs
or tedious C code.

Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agogit-gui: sv.po: Update Swedish translation (576t0f0u)
Peter Krefting [Thu, 26 Oct 2023 20:30:12 +0000 (21:30 +0100)] 
git-gui: sv.po: Update Swedish translation (576t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
12 months agomerge: avoid write merge state when unable to write index
Kyle Zhao [Mon, 17 Jun 2024 03:08:37 +0000 (03:08 +0000)] 
merge: avoid write merge state when unable to write index

Writing the merge state after the index write fails is meaningless and
could potentially cause Git to lose changes.

Signed-off-by: Kyle Zhao <kylezhao@tencent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoThe fourteenth batch
Junio C Hamano [Mon, 17 Jun 2024 22:53:13 +0000 (15:53 -0700)] 
The fourteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 months agoMerge branch 'jk/imap-send-plug-all-msgs-leak'
Junio C Hamano [Mon, 17 Jun 2024 22:55:58 +0000 (15:55 -0700)] 
Merge branch 'jk/imap-send-plug-all-msgs-leak'

A leak in "git imap-send" that somehow escapes LSan has been
plugged.

* jk/imap-send-plug-all-msgs-leak:
  imap-send: free all_msgs strbuf in "out" label

12 months agoMerge branch 'ps/no-writable-strings'
Junio C Hamano [Mon, 17 Jun 2024 22:55:57 +0000 (15:55 -0700)] 
Merge branch 'ps/no-writable-strings'

Building with "-Werror -Wwrite-strings" is now supported.

* ps/no-writable-strings: (27 commits)
  config.mak.dev: enable `-Wwrite-strings` warning
  builtin/merge: always store allocated strings in `pull_twohead`
  builtin/rebase: always store allocated string in `options.strategy`
  builtin/rebase: do not assign default backend to non-constant field
  imap-send: fix leaking memory in `imap_server_conf`
  imap-send: drop global `imap_server_conf` variable
  mailmap: always store allocated strings in mailmap blob
  revision: always store allocated strings in output encoding
  remote-curl: avoid assigning string constant to non-const variable
  send-pack: always allocate receive status
  parse-options: cast long name for OPTION_ALIAS
  http: do not assign string constant to non-const field
  compat/win32: fix const-correctness with string constants
  pretty: add casts for decoration option pointers
  object-file: make `buf` parameter of `index_mem()` a constant
  object-file: mark cached object buffers as const
  ident: add casts for fallback name and GECOS
  entry: refactor how we remove items for delayed checkouts
  line-log: always allocate the output prefix
  line-log: stop assigning string constant to file parent buffer
  ...

12 months agoMerge branch 'jk/am-retry'
Junio C Hamano [Mon, 17 Jun 2024 22:55:56 +0000 (15:55 -0700)] 
Merge branch 'jk/am-retry'

"git am" has a safety feature to prevent it from starting a new
session when there already is a session going.  It reliably
triggers when a mbox is given on the command line, but it has to
rely on the tty-ness of the standard input.  Add an explicit way to
opt out of this safety with a command line option.

* jk/am-retry:
  test-terminal: drop stdin handling
  am: add explicit "--retry" option

12 months agoMerge branch 'jc/varargs-attributes'
Junio C Hamano [Mon, 17 Jun 2024 22:55:55 +0000 (15:55 -0700)] 
Merge branch 'jc/varargs-attributes'

Varargs functions that are unannotated as printf-like or execl-like
have been annotated as such.

* jc/varargs-attributes:
  __attribute__: add a few missing format attributes
  __attribute__: mark some functions with LAST_ARG_MUST_BE_NULL
  __attribute__: remove redundant attribute declaration for git_die_config()
  __attribute__: trace2_region_enter_printf() is like "printf"

12 months agoMerge branch 'ps/ref-storage-migration'
Junio C Hamano [Mon, 17 Jun 2024 22:55:55 +0000 (15:55 -0700)] 
Merge branch 'ps/ref-storage-migration'

A new command has been added to migrate a repository that uses the
files backend for its ref storage to use the reftable backend, with
limitations.

* ps/ref-storage-migration:
  builtin/refs: new command to migrate ref storage formats
  refs: implement logic to migrate between ref storage formats
  refs: implement removal of ref storages
  worktree: don't store main worktree twice
  reftable: inline `merged_table_release()`
  refs/files: fix NULL pointer deref when releasing ref store
  refs/files: extract function to iterate through root refs
  refs/files: refactor `add_pseudoref_and_head_entries()`
  refs: allow to skip creation of reflog entries
  refs: pass storage format to `ref_store_init()` explicitly
  refs: convert ref storage format to an enum
  setup: unset ref storage when reinitializing repository version

12 months agoMerge branch 'ps/check-docs-fix'
Junio C Hamano [Mon, 17 Jun 2024 22:55:54 +0000 (15:55 -0700)] 
Merge branch 'ps/check-docs-fix'

"make check-docs" noticed problems and reported to its output but
failed to signal its findings with its exit status, which has been
corrected.

* ps/check-docs-fix:
  ci/test-documentation: work around SyntaxWarning in Python 3.12
  gitlab-ci: add job to run `make check-docs`
  Documentation/lint-manpages: bubble up errors
  Makefile: extract script to lint missing/extraneous manpages

12 months agoMerge branch 'ps/ci-fix-detection-of-ubuntu-20'
Junio C Hamano [Mon, 17 Jun 2024 22:55:53 +0000 (15:55 -0700)] 
Merge branch 'ps/ci-fix-detection-of-ubuntu-20'

Fix for an embarrassing typo that prevented Python2 tests from running
anywhere.

* ps/ci-fix-detection-of-ubuntu-20:
  ci: fix check for Ubuntu 20.04