1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-07 20:06:10 +02:00
Commit Graph

73168 Commits

Author SHA1 Message Date
Junio C Hamano 0c9c63564e Sync with 'master' 2024-04-22 15:11:45 -07:00
Junio C Hamano cacdcac452 Merge branch 'ps/run-auto-maintenance-in-receive-pack' into next
The "receive-pack" program (which responds to "git push") was not
converted to run "git maintenance --auto" when other codepaths that
used to run "git gc --auto" were updated, which has been corrected.

* ps/run-auto-maintenance-in-receive-pack:
  builtin/receive-pack: convert to use git-maintenance(1)
  run-command: introduce function to prepare auto-maintenance process
2024-04-22 15:11:13 -07:00
Junio C Hamano 4dd13c288f Merge branch 'pk/bisect-use-show' into next
When "git bisect" reports the commit it determined to be the
culprit, we used to show it in a format that does not honor common
UI tweaks, like log.date and log.decorate.  The code has been
taught to use "git show" to follow more customizations.

* pk/bisect-use-show:
  bisect: report the found commit with "show"
2024-04-22 15:11:13 -07:00
Patrick Steinhardt 00e10ef10e docs: address typos in Git v2.45 changelog
Address some typos in the Git v2.45 changelog.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-22 08:54:01 -07:00
Patrick Steinhardt bbeb79789c docs: improve changelog entry for `git pack-refs --auto`
The changelog entry for the new `git pack-refs --auto` mode only says
that the new flag is useful, but doesn't really say what it does. Add
some more information.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-22 08:54:01 -07:00
Orgad Shaneh bf3fe4f1a2 docs: remove duplicate entry and fix typo in 2.45 changelog
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-22 08:53:41 -07:00
Junio C Hamano bae5840b3b Git 2.45-rc0
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmYimLEACgkQsLXohpav
 5stroBAA2hhWEEAtzbhr3J9JYWP32Mj9lPFUiwm1L+w54IK/+McTZFUMQrbnmZ6D
 7EzzlOitGG0uVJtKA9ogVyDM6m7rXd1xmiA3gkPXA/SVo+j8lWob8H0avBEWqK56
 tXl/C1D4VkbjWoRR1R6NT92PGZOu/mvSKSLmYz8cMAy+yYi9s2wgrVVwwhPM8fLg
 TbHXRSgLOtzu2fwvF3EzdddddB4XyESjQrtQ7d9PD8uh08WEDg8dBwJ3OJzUIRbh
 C+L3HYl82zHyBQ+zjPRoOmS7+lLnEo6gViCSx/DHWvrv3/IunIAl/AsULCUTTqsY
 o0QDQ+18FcLPFo6RfY8NJCBOIudH6jgHJNw4qekCWPGlgyXlpden+TPLckaCXxfG
 i9TEhU6XbvtOf25IHDE896jlZUJwchgD+b3IU71kqrLFmVTUITpjhqATsBU8xevD
 CXJ7xO0xxl1yXu7sGittezu//L4bP6peSOOPvLMP2GRb45nZQni+S5yuWJTpUj2Z
 xidSBT78NnQiz5oTlOtda1bjSJWTLdmRog7vLI4Vf2UrJEPlh3efYYWi0r6dpD3A
 +sg2Cbg0g4a/NGaifouPv1eLsHNu9B6tz3H+Mu3TwxnI+jvFkAkarn285CM1owk+
 DuScyb9wMhns0uGau+xVvGCvl1HXaQ0ABussBOyzNn94pi3fCYU=
 =g9QN
 -----END PGP SIGNATURE-----

Sync with Git 2.45-rc0
2024-04-19 09:18:51 -07:00
Junio C Hamano ae3196a5ea Git 2.45-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-19 09:13:47 -07:00
Junio C Hamano 6c69d3a91f Merge branch 'la/mailmap-entry'
Update contact address for Linus Arver.

* la/mailmap-entry:
  mailmap: change primary address for Linus Arver
2024-04-19 09:13:47 -07:00
Junio C Hamano 18dd9301a2 Merge branch 'pf/commitish-committish'
Spellfix.

* pf/commitish-committish:
  typo: replace 'commitish' with 'committish'
2024-04-19 09:13:47 -07:00
Junio C Hamano 701ccded8b Merge branch 'rs/apply-reject-long-name' into next
The filename used for rejected hunks "git apply --reject" creates
was limited to PATH_MAX, which has been lifted.

* rs/apply-reject-long-name:
  apply: avoid using fixed-size buffer in write_out_one_reject()
2024-04-17 14:42:52 -07:00
Junio C Hamano 60be8e2d74 Merge branch 'mr/rerere-crash-fix' into next
When .git/rr-cache/ rerere database gets corrupted or rerere is fed to
work on a file with conflicted hunks resolved incompletely, the rerere
machinery got confused and segfaulted, which has been corrected.

* mr/rerere-crash-fix:
  rerere: fix crashes due to unmatched opening conflict markers
2024-04-17 14:42:52 -07:00
Junio C Hamano 0255e49f8b Merge branch 'rs/imap-send-simplify-cmd-issuing-codepath' into next
Code simplification.

* rs/imap-send-simplify-cmd-issuing-codepath:
  imap-send: increase command size limit
2024-04-17 14:42:51 -07:00
Junio C Hamano f2186bd6e8 Merge branch 'xx/rfc2822-date-format-in-doc' into next
Docfix.

* xx/rfc2822-date-format-in-doc:
  Documentation: fix typos describing date format
2024-04-17 14:42:51 -07:00
Junio C Hamano 440b18b8be Merge branch 'la/mailmap-entry' into next
* la/mailmap-entry:
  mailmap: change primary address for Linus Arver
2024-04-17 14:42:49 -07:00
Patrick Steinhardt 7bf3057d9c builtin/receive-pack: convert to use git-maintenance(1)
In 850b6edefa (auto-gc: extract a reusable helper from "git fetch",
2020-05-06), we have introduced a helper function `run_auto_gc()` that
kicks off `git gc --auto`. The intent of this function was to pass down
the "--quiet" flag to git-gc(1) as required without duplicating this at
all callsites. In 7c3e9e8cfb (auto-gc: pass --quiet down from am,
commit, merge and rebase, 2020-05-06) we then converted callsites that
need to pass down this flag to use the new helper function. This has the
notable omission of git-receive-pack(1), which is the only remaining
user of `git gc --auto` that sets up the proccess manually. This is
probably because it unconditionally passes down the `--quiet` flag and
thus didn't benefit much from the new helper function.

In a95ce12430 (maintenance: replace run_auto_gc(), 2020-09-17) we then
replaced `run_auto_gc()` with `run_auto_maintenance()` which invokes
git-maintenance(1) instead of git-gc(1). This command is the modern
replacement for git-gc(1) and is both more thorough and also more
flexible because administrators can configure which tasks exactly to run
during maintenance.

But due to git-receive-pack(1) not using `run_auto_gc()` in the first
place it did not get converted to use git-maintenance(1) like we do
everywhere else now. Address this oversight and start to use the newly
introduced function `prepare_auto_maintenance()`. This will also make it
easier for us to adapt this code together with all the other callsites
that invoke auto-maintenance in the future.

This removes the last internal user of `git gc --auto`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-17 08:42:26 -07:00
Patrick Steinhardt b396ee6bed run-command: introduce function to prepare auto-maintenance process
The `run_auto_maintenance()` function is responsible for spawning a new
`git maintenance run --auto` process. To do so, it sets up the `sturct
child_process` and then runs it by executing `run_command()` directly.
This is rather inflexible in case callers want to modify the child
process somewhat, e.g. to redirect stderr or stdout.

Introduce a new `prepare_auto_maintenance()` function to plug this gap.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-17 08:42:26 -07:00
Linus Arver 8882ee9d68 mailmap: change primary address for Linus Arver
Linus will lose access to his work email soon.

Signed-off-by: Linus Arver <linusa@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-16 22:25:11 -07:00
Junio C Hamano 071b0575f8 Sync with 'master' 2024-04-16 14:52:33 -07:00
Junio C Hamano c70779ba4b Merge branch 'ps/missing-btmp-fix' into next
GIt 2.44 introduced a regression that makes the updated code to
barf in repositories with multi-pack index written by older
versions of Git, which has been corrected.

* ps/missing-btmp-fix:
  pack-bitmap: gracefully handle missing BTMP chunks
2024-04-16 14:52:18 -07:00
Junio C Hamano dca4784407 Merge branch 'la/format-trailer-info' into next
The code to format trailers have been cleaned up.

* la/format-trailer-info:
  trailer: finish formatting unification
  trailer: begin formatting unification
  format_trailer_info(): append newline for non-trailer lines
  format_trailer_info(): drop redundant unfold_value()
  format_trailer_info(): use trailer_item objects
2024-04-16 14:52:17 -07:00
Junio C Hamano 46ab81737f Merge branch 'dd/t9604-use-posix-timezones' into next
The cvsimport tests required that the platform understands
traditional timezone notations like CST6CDT, which has been
updated to work on those systems as long as they understand
POSIX notation with explicit tz transition dates.

* dd/t9604-use-posix-timezones:
  t9604: Fix test for musl libc and new Debian
2024-04-16 14:52:17 -07:00
Junio C Hamano 3d0dd46fc2 Merge branch 'rj/launch-editor-error-message' into next
Git writes a "waiting for your editor" message on an incomplete
line after launching an editor, and then append another error
message on the same line if the editor errors out.  It now clears
the "waiting for..." line before giving the error message.

* rj/launch-editor-error-message:
  launch_editor: waiting message on error
2024-04-16 14:52:16 -07:00
Junio C Hamano 21306a098c The twentieth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-16 14:50:31 -07:00
Junio C Hamano 93e3f9df7a Merge branch 'pw/t3428-cleanup'
Test cleanup.

* pw/t3428-cleanup:
  t3428: restore coverage for "apply" backend
  t3428: use test_commit_message
  t3428: modernize test setup
2024-04-16 14:50:31 -07:00
Junio C Hamano 51c15ac1b6 Merge branch 'ba/osxkeychain-updates'
Update osxkeychain backend with features required for the recent
credential subsystem.

* ba/osxkeychain-updates:
  osxkeychain: store new attributes
  osxkeychain: erase matching passwords only
  osxkeychain: erase all matching credentials
  osxkeychain: replace deprecated SecKeychain API
2024-04-16 14:50:30 -07:00
Junio C Hamano 82a31ec324 Merge branch 'jt/reftable-geometric-compaction'
The strategy to compact multiple tables of reftables after many
operations accumulate many entries has been improved to avoid
accumulating too many tables uncollected.

* jt/reftable-geometric-compaction:
  reftable/stack: use geometric table compaction
  reftable/stack: add env to disable autocompaction
  reftable/stack: expose option to disable auto-compaction
2024-04-16 14:50:30 -07:00
Junio C Hamano 2b49e41155 Merge branch 'tb/make-indent-conditional-with-non-spaces'
Adjust to an upcoming changes to GNU make that breaks our Makefiles.

* tb/make-indent-conditional-with-non-spaces:
  Makefile(s): do not enforce "all indents must be done with tab"
  Makefile(s): avoid recipe prefix in conditional statements
2024-04-16 14:50:29 -07:00
Junio C Hamano a7589384d5 Merge branch 'rs/usage-fallback-to-show-message-format'
vreportf(), which is usede by error() and friends, has been taught
to give the error message printf-format string when its vsnprintf()
call fails, instead of showing nothing useful to identify the
nature of the error.

* rs/usage-fallback-to-show-message-format:
  usage: report vsnprintf(3) failure
2024-04-16 14:50:29 -07:00
Junio C Hamano 107313eb11 Merge branch 'rs/date-mode-pass-by-value'
The codepaths that reach date_mode_from_type() have been updated to
pass "struct date_mode" by value to make them thread safe.

* rs/date-mode-pass-by-value:
  date: make DATE_MODE thread-safe
2024-04-16 14:50:29 -07:00
Junio C Hamano 2d642afb0a Merge branch 'sj/userdiff-c-sharp'
The userdiff patterns for C# has been updated.

Acked-by: Johannes Sixt <j6t@kdbg.org>
cf. <c2154457-3f2f-496e-9b8b-c8ea7257027b@kdbg.org>

* sj/userdiff-c-sharp:
  userdiff: better method/property matching for C#
2024-04-16 14:50:28 -07:00
Junio C Hamano 625ef1c6f1 Merge branch 'tb/t7700-fixup'
Test fix.

* tb/t7700-fixup:
  t/t7700-repack.sh: fix test breakages with `GIT_TEST_MULTI_PACK_INDEX=1 `
2024-04-16 14:50:28 -07:00
Junio C Hamano 92e8388bd3 Merge branch 'jc/local-extern-shell-rules'
Document and apply workaround for a buggy version of dash that
mishandles "local var=val" construct.

* jc/local-extern-shell-rules:
  t1016: local VAR="VAL" fix
  t0610: local VAR="VAL" fix
  t: teach lint that RHS of 'local VAR=VAL' needs to be quoted
  t: local VAR="VAL" (quote ${magic-reference})
  t: local VAR="VAL" (quote command substitution)
  t: local VAR="VAL" (quote positional parameters)
  CodingGuidelines: quote assigned value in 'local var=$val'
  CodingGuidelines: describe "export VAR=VAL" rule
2024-04-16 14:50:27 -07:00
René Scharfe 20fee9af9e apply: avoid using fixed-size buffer in write_out_one_reject()
On some systems PATH_MAX is not a hard limit.  Support longer paths by
building them on the heap instead of using static buffers.

Take care to work around (arguably buggy) implementations of free(3)
that change errno by calling it only after using the errno value.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-16 13:38:35 -07:00
Marcel Röthke 167395bb47 rerere: fix crashes due to unmatched opening conflict markers
When rerere handles a conflict with an unmatched opening conflict marker
in a file with other conflicts, it will fail create a preimage and also
fail allocate the status member of struct rerere_dir. Currently the
status member is allocated after the error handling. This will lead to a
SEGFAULT when the status member is accessed during cleanup of the failed
parse.

Additionally, in subsequent executions of rerere, after removing the
MERGE_RR.lock manually, rerere crashes for a similar reason. MERGE_RR
points to a conflict id that has no preimage, therefore the status
member is not allocated and a SEGFAULT happens when trying to check if a
preimage exists.

Solve this by making sure the status field is allocated correctly and add
tests to prevent the bug from reoccurring.

This does not fix the root cause, failing to parse stray conflict
markers, but I don't think we can do much better than recognizing it,
printing an error, and moving on gracefully.

Signed-off-by: Marcel Röthke <marcel@roethke.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-16 08:42:36 -07:00
Junio C Hamano 10fc6c4f0a Sync with 'master' 2024-04-15 14:17:18 -07:00
Junio C Hamano e8cf9cd9a8 Merge branch 'yb/replay-doc-linkfix' into next
Docfix.

* yb/replay-doc-linkfix:
  Documentation: fix linkgit reference
2024-04-15 14:17:06 -07:00
Junio C Hamano 48cab93d0a Merge branch 'rs/no-openssl-compilation-fix-on-macos' into next
Build fix.

* rs/no-openssl-compilation-fix-on-macos:
  git-compat-util: fix NO_OPENSSL on current macOS
2024-04-15 14:17:06 -07:00
Junio C Hamano 00cc71a679 Merge branch 'ta/fast-import-parse-path-fix' into next
The way "git fast-import" handles paths described in its input has
been tightened up and more clearly documented.

* ta/fast-import-parse-path-fix:
  fast-import: make comments more precise
  fast-import: forbid escaped NUL in paths
  fast-import: document C-style escapes for paths
  fast-import: improve documentation for path quoting
  fast-import: remove dead strbuf
  fast-import: allow unquoted empty path for root
  fast-import: directly use strbufs for paths
  fast-import: tighten path unquoting
2024-04-15 14:17:06 -07:00
Junio C Hamano 3a2353c7f2 Merge branch 'ps/reftable-block-iteration-optim' into next
The code to iterate over reftable blocks has seen some optimization
to reduce memory allocation and deallocation.

* ps/reftable-block-iteration-optim:
  reftable/block: avoid copying block iterators on seek
  reftable/block: reuse `zstream` state on inflation
  reftable/block: open-code call to `uncompress2()`
  reftable/block: reuse uncompressed blocks
  reftable/reader: iterate to next block in place
  reftable/block: move ownership of block reader into `struct table_iter`
  reftable/block: introduce `block_reader_release()`
  reftable/block: better grouping of functions
  reftable/block: merge `block_iter_seek()` and `block_reader_seek()`
  reftable/block: rename `block_reader_start()`
2024-04-15 14:17:06 -07:00
Junio C Hamano 548fe35913 The ninteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-04-15 14:11:44 -07:00
Junio C Hamano cb25f97eab Merge branch 'jc/t2104-style-fixes'
Test style fixes.

* jc/t2104-style-fixes:
  t2104: style fixes
2024-04-15 14:11:44 -07:00
Junio C Hamano b415f15b49 Merge branch 'jc/unleak-core-excludesfile'
The variable that holds the value read from the core.excludefile
configuration variable used to leak, which has been corrected.

* jc/unleak-core-excludesfile:
  config: do not leak excludes_file
2024-04-15 14:11:44 -07:00
Junio C Hamano eba498a774 Merge branch 'jk/libcurl-8.7-regression-workaround'
Fix was added to work around a regression in libcURL 8.7.0 (which has
already been fixed in their tip of the tree).

* jk/libcurl-8.7-regression-workaround:
  remote-curl: add Transfer-Encoding header only for older curl
  INSTALL: bump libcurl version to 7.21.3
  http: reset POSTFIELDSIZE when clearing curl handle
2024-04-15 14:11:44 -07:00
Junio C Hamano 372aabe912 Merge branch 'ps/t0610-umask-fix'
The "shared repository" test in the t0610 reftable test failed
under restrictive umask setting (e.g. 007), which has been
corrected.

* ps/t0610-umask-fix:
  t0610: execute git-pack-refs(1) with specified umask
  t0610: make `--shared=` tests reusable
2024-04-15 14:11:43 -07:00
Junio C Hamano d75ec4c627 Merge branch 'gt/add-u-commit-i-pathspec-check'
"git add -u <pathspec>" and "git commit [-i] <pathspec>" did not
diagnose a pathspec element that did not match any files in certain
situations, unlike "git add <pathspec>" did.

* gt/add-u-commit-i-pathspec-check:
  builtin/add: error out when passing untracked path with -u
  builtin/commit: error out when passing untracked path with -i
  revision: optionally record matches with pathspec elements
2024-04-15 14:11:43 -07:00
Junio C Hamano 6c142bc846 Merge branch 'ds/fetch-config-parse-microfix'
A config parser callback function fell through instead of returning
after recognising and processing a variable, wasting cycles, which
has been corrected.

* ds/fetch-config-parse-microfix:
  fetch: return when parsing submodule.recurse
2024-04-15 14:11:43 -07:00
Junio C Hamano ce729ea9ba Merge branch 'rs/apply-reject-fd-leakfix'
A file descriptor leak in an error codepath, used when "git apply
--reject" fails to create the *.rej file, has been corrected.

* rs/apply-reject-fd-leakfix:
  apply: don't leak fd on fdopen() error
2024-04-15 14:11:43 -07:00
Junio C Hamano c7a9ec4728 Merge branch 'rs/apply-lift-path-length-limit'
"git apply" has been updated to lift the hardcoded pathname length
limit, which in turn allowed a mksnpath() function that is no
longer used.

* rs/apply-lift-path-length-limit:
  path: remove mksnpath()
  apply: avoid fixed-size buffer in create_one_file()
2024-04-15 14:11:42 -07:00
Junio C Hamano 509cc1d413 Merge branch 'ma/win32-unix-domain-socket'
Windows binary used to decide the use of unix-domain socket at
build time, but it learned to make the decision at runtime instead.

* ma/win32-unix-domain-socket:
  Win32: detect unix socket support at runtime
2024-04-15 14:11:42 -07:00