16991 Commits

Author SHA1 Message Date
Junio C Hamano
d204057940 Merge branch 'mh/doc-credential-url-prefix' into maint-2.51
Doc update to describe a feature that has already been implemented.

* mh/doc-credential-url-prefix:
  docs/gitcredentials: describe URL prefix matching
2025-10-15 10:29:35 -07:00
Junio C Hamano
2a33cd6864 Merge branch 'ag/doc-sendmail-gmail-example-update' into maint-2.51
Doc update.

* ag/doc-sendmail-gmail-example-update:
  docs: update sendmail docs to use more secure SMTP server for Gmail
2025-10-15 10:29:34 -07:00
Junio C Hamano
e0a4669e56 Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix' into maint-2.51
Doc mark-up fix.

* jc/doc-includeif-hasconfig-remote-url-fix:
  config: document includeIf conditions consistently
2025-10-15 10:29:34 -07:00
Junio C Hamano
2ab0f47bd3 Merge branch 'mm/worktree-doc-typofix' into maint-2.51
Docfix.

* mm/worktree-doc-typofix:
  docs: fix typo in worktree.adoc 'extension'
2025-10-15 10:29:34 -07:00
Junio C Hamano
2d9f2dc7ce Merge branch 'kh/doc-markup-fixes' into maint-2.51
Doc markup fixes.

* kh/doc-markup-fixes:
  doc: remove extra backtick for inline-verbatim
  doc: add missing backtick for inline-verbatim
2025-10-15 10:29:33 -07:00
Junio C Hamano
f07b97aa6e Merge branch 'km/alias-doc-markup-fix' into maint-2.51
Docfix.

* km/alias-doc-markup-fix:
  doc: fix formatting of function-wrap shell alias
2025-10-15 10:29:33 -07:00
Junio C Hamano
51195bdab2 Merge branch 'js/doc-sending-patch-via-thunderbird' into maint-2.51
Doc update.

* js/doc-sending-patch-via-thunderbird:
  doc/format-patch: adjust Thunderbird MUA hint to new add-on
2025-10-15 10:29:32 -07:00
Junio C Hamano
9c22d96e56 Merge branch 'kr/clone-synopsis-fix' into maint-2.51
Doc fix.

* kr/clone-synopsis-fix:
  docs: remove stray bracket from git-clone synopsis
2025-10-15 10:29:32 -07:00
Junio C Hamano
9740baaf0e Merge branch 'kh/doc-git-log-markup-fix' into maint-2.51
Doc update.

* kh/doc-git-log-markup-fix:
  doc: git-log: fix description list
2025-10-15 10:29:31 -07:00
Junio C Hamano
e04c0aded3 Merge branch 'ps/reflog-migrate-fixes' into maint-2.51
"git refs migrate" to migrate the reflog entries from a refs
backend to another had a handful of bugs squashed.

* ps/reflog-migrate-fixes:
  refs: fix invalid old object IDs when migrating reflogs
  refs: stop unsetting REF_HAVE_OLD for log-only updates
  refs/files: detect race when generating reflog entry for HEAD
  refs: fix identity for migrated reflogs
  ident: fix type of string length parameter
  builtin/reflog: implement subcommand to write new entries
  refs: export `ref_transaction_update_reflog()`
  builtin/reflog: improve grouping of subcommands
  Documentation/git-reflog: convert to use synopsis type
2025-10-15 10:29:28 -07:00
Kristoffer Haugsbakk
8c3d7c5f11 RelNotes: minor fixups before 2.51.1
Grammar and typo fixes. Also change “work it around” to “work around”.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15 09:25:00 -07:00
Patrick Steinhardt
f570bd91b3 refs/files: deprecate writing symrefs as symbolic links
The "files" backend has the ability to store symbolic refs as symbolic
links, which can be configured via "core.preferSymlinkRefs". This
feature stems back from the early days: the initial implementation of
symbolic refs used symlinks exclusively. The symref format was only
introduced in 9b143c6e15 (Teach update-ref about a symbolic ref stored
in a textfile., 2005-09-25) and made the default in 9f0bb90d16
(core.prefersymlinkrefs: use symlinks for .git/HEAD, 2006-05-02).

This is all about 20 years ago, and there are no known reasons nowadays
why one would want to use symlinks instead of symrefs. Mark the feature
for deprecation in Git 3.0.

Note that this only deprecates _writing_ symrefs as symbolic links.
Reading such symrefs is still supported for now.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15 09:11:08 -07:00
Junio C Hamano
b660e2dcb9 Sync with 'maint' 2025-10-14 13:44:35 -07:00
Junio C Hamano
dba6e578b6 Prepare for 2.51.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-14 13:43:25 -07:00
Junio C Hamano
3bc761681f Merge branch 'kh/doc-fast-import-markup-fix' into maint-2.51
Doc mark-up fix.

* kh/doc-fast-import-markup-fix:
  doc: fast-import: replace literal block with paragraph
2025-10-14 13:40:55 -07:00
Junio C Hamano
12c542bbcf Merge branch 'kh/doc-config-typofix' into maint-2.51
Documentation typofix.

* kh/doc-config-typofix:
  doc: config: replace backtick with apostrophe for possessive
2025-10-14 13:40:55 -07:00
Junio C Hamano
fb3f8af737 Merge branch 'kh/doc-interpret-trailers-markup-fix' into maint-2.51
Fix missing single-quote pairs in a documentation page.

* kh/doc-interpret-trailers-markup-fix:
  doc: interpret-trailers: close all pairs of single quotes
2025-10-14 13:40:55 -07:00
Junio C Hamano
d227777796 Merge branch 'ds/doc-count-objects-fix' into maint-2.51
Docfix.

* ds/doc-count-objects-fix:
  count-objects: document count-objects pack
2025-10-14 13:40:54 -07:00
Junio C Hamano
7d050a531d Merge branch 'ja/asciidoc-doctor-verbatim-fixes' into maint-2.51
Doc mark-up fix.

* ja/asciidoc-doctor-verbatim-fixes:
  doc: fix asciidoc format compatibility in pretty-formats.adoc
2025-10-14 13:40:54 -07:00
Junio C Hamano
5b57e1e926 Merge branch 'js/progress-delay-fix' into maint-2.51
The start_delayed_progress() function in the progress eye-candy API
did not clear its internal state, making an initial delay value
larger than 1 second ineffective, which has been corrected.

* js/progress-delay-fix:
  progress: pay attention to (customized) delay time
2025-10-14 13:40:54 -07:00
Junio C Hamano
3778b8022d Merge branch 'ds/doc-ggg-pr-fork-clarify' into maint-2.51
Update the instruction to use of GGG in the MyFirstContribution
document to say that a GitHub PR could be made against `git/git`
instead of `gitgitgadget/git`.

* ds/doc-ggg-pr-fork-clarify:
  doc: clarify which remotes can be used with GitGitGadget
2025-10-14 13:40:53 -07:00
Junio C Hamano
0b4a263bd8 Merge branch 'js/doc-gitk-history' into maint-2.51
Manual page for "gitk" is updated with the current maintainer's
name.

* js/doc-gitk-history:
  doc/gitk: update reference to the external project
2025-10-14 13:40:53 -07:00
Junio C Hamano
f9f50d6348 Merge branch 'bc/doc-compat-object-format-not-working' into maint-2.51
The compatObjectFormat extension is used to hide an incomplete
feature that is not yet usable for any purpose other than
developing the feature further.  Document it as such to discourage
its use by mere mortals.

* bc/doc-compat-object-format-not-working:
  docs: note that extensions.compatobjectformat is incomplete
2025-10-14 13:40:52 -07:00
Junio C Hamano
aea86cf00f The nineteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-14 12:56:09 -07:00
Junio C Hamano
44dee53a30 Merge branch 'jc/optional-path'
Configuration variables that take a pathname as a value
(e.g. blame.ignorerevsfile) can be marked as optional by prefixing
":(optoinal)" before its value.

* jc/optional-path:
  parseopt: values of pathname type can be prefixed with :(optional)
  config: values of pathname type can be prefixed with :(optional)
  t7500: fix GIT_EDITOR shell snippet
  t7500: make each piece more independent
2025-10-14 12:56:09 -07:00
Junio C Hamano
1003719fb7 Merge branch 'je/doc-push-upstream'
Documentation updates.

* je/doc-push-upstream:
  doc: git-push: add explanation of `git push origin main`
  doc: git-push: clarify "what to push"
  doc: git-push: clarify "where to push"
  doc: add an UPSTREAM BRANCHES section to pull/push/fetch
  doc: git-push: clarify intro
2025-10-14 12:56:09 -07:00
Junio C Hamano
ca5a44b15c Merge branch 'kh/doc-patch-id-markup-fix'
Documentation mark-up fix.

* kh/doc-patch-id-markup-fix:
  doc: patch-id: fix accidental literal blocks
2025-10-14 12:56:08 -07:00
Junio C Hamano
11f5a2264e Merge branch 'jn/doc-help-translaing-pretty-options'
Documentation for "git log --pretty" options has been updated
to make it easier to translate.

* jn/doc-help-translaing-pretty-options:
  doc: do not break sentences into "lego" pieces
2025-10-14 12:56:08 -07:00
Junio C Hamano
38553df73c Merge branch 'jn/doc-synopsis'
Doc-mark-up modernization continues.

* jn/doc-synopsis:
  doc: convert git worktree to synopsis style
  doc: convert git tag to synopsis style
  doc: convert git-stash.adoc to synopis style
2025-10-14 12:56:08 -07:00
Junio C Hamano
ac7d021f06 The eighteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-13 22:00:35 -07:00
Junio C Hamano
f50f046794 Merge branch 'kn/reftable-consistency-checks'
The reftable backend learned to sanity check its on-disk data more
carefully.

* kn/reftable-consistency-checks:
  refs/reftable: add fsck check for checking the table name
  reftable: add code to facilitate consistency checks
  fsck: order 'fsck_msg_type' alphabetically
  Documentation/fsck-msgids: remove duplicate msg id
  reftable: check for trailing newline in 'tables.list'
  refs: move consistency check msg to generic layer
  refs: remove unused headers
2025-10-13 22:00:35 -07:00
Junio C Hamano
c96add7552 Merge branch 'ja/doc-markup-attached-paragraph-fix'
Documentation mark-up fix.

* ja/doc-markup-attached-paragraph-fix:
  doc: fix indentation of refStorage item in git-config(1)
  doc: change the markup of paragraphs following a nested list item
2025-10-13 22:00:35 -07:00
Kristoffer Haugsbakk
8f487db07a doc: patch-id: convert to the modern synopsis style
Convert this command documentation to the modern synopsis style based on
similar work.[1] Concretely:

• Change the Synopsis section from `verse` to a `synopsis` block which
  will automatically apply the correct formatting to various elements
  (although this Synopsis is very simple)
• Use backticks (`) for code-like things which will also use the correct
  formatting for interior placeholders (`<orderfile>`)
• Use inline-verbatim on options listing

† 1: E.g.,
     • 026f2e3b (doc: convert git-log to new documentation format,
       2025-07-07)
     • b983aaab (doc: convert git-switch manpage to new synopsis style,
       2025-05-25)
     • 16543967 (doc: convert git-mergetool manpage to new synopsis
       style, 2025-05-25)

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-13 08:53:13 -07:00
Christian Couder
d8ce08aa13 fast-import: add '--signed-tags=<mode>' option
Recently, eaaddf5791 (fast-import: add '--signed-commits=<mode>'
option, 2025-09-17) added support for controlling how signed commits
are handled by `git fast-import`, but there is no option yet to
decide about signed tags.

To remediate that, let's add a '--signed-tags=<mode>' option to
`git fast-import` too.

With this, both `git fast-export` and `git fast-import` have both
a '--signed-tags=<mode>' and a '--signed-commits=<mode>' supporting
the same <mode>s.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-13 08:51:42 -07:00
Christian Couder
db674095c0 doc: git-tag: stop focusing on GPG signed tags
It looks like the documentation of `git tag` is focused a bit too
much on GPG signed tags.

This starts with the "NAME" section where the command is described
with:

"Create, list, delete or verify a tag object signed with GPG"

while for example `git branch` is described with simply:

"List, create, or delete branches"

This could give the false impression that `git tag` only works with
tag objects, not with lightweight tags, and that tag objects are
always GPG signed.

In the "DESCRIPTION" section, it looks like only "GnuPG signed tag
objects" can be created by the `-s` and `-u <key-id>` options, and it
seems `gpg.program` can only specify a "custom GnuPG binary".

This goes on in the "OPTIONS" section too, especially about the `-s`
and `-u <key-id>` options.

The "CONFIGURATION" section also doesn't talk about how to configure
the command to work with X.509 and SSH signatures.

Let's rework all that to make sure users have a more accurate and
balanced view of what the command can do.

Helped-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-13 08:51:41 -07:00
Junio C Hamano
4b71b29477 The seventeenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-10 12:51:46 -07:00
Junio C Hamano
472c3f5607 Merge branch 'en/doc-merge-tree-describe-merge-base'
Clarify the "--merge-base" command line option in "git merge-tree".

* en/doc-merge-tree-describe-merge-base:
  Documentation/git-merge-tree.adoc: clarify the --merge-base option
2025-10-10 12:51:46 -07:00
Junio C Hamano
4750afe9b9 Merge branch 'rj/doc-missing-technical-docs'
Doc updates.

* rj/doc-missing-technical-docs:
  doc: add some missing technical documents
2025-10-10 12:51:46 -07:00
Kristoffer Haugsbakk
b3ac6e737d doc: fix accidental literal blocks
Make sure that normal paragraphs in most user-facing docs[1] don’t
use literal blocks. This can easily happen if you try to maintain
indentation in order to continue a block; that might work in
e.g. Markdown variants, but not in AsciiDoc.

The fixes are straightforward, i.e. just deindent the block and maybe
add line continuations. The only exception is git-sparse-checkout(1)
where we also replace indentation used for *intended* literal blocks
with `----`.

† 1: These have not been considered:
     • `Documentation/howto/`
     • `Documentation/technical/`
     • `Documentation/gitprotocol*`

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-10 07:56:09 -07:00
D. Ben Knoble
55269ece04 doc: explain the impact of stash.index on --autostash options
With 9842c0c749 (stash: honor stash.index in apply, pop modes,
2025-09-21) merged in a5d4779e6e (Merge branch 'dk/stash-apply-index',
2025-09-29), we did not advertise the connection between the new config
option stash.index and the implicit use of git-stash via --autostash
(which may also be configured). Do so.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:49:21 -07:00
brian m. carlson
51acda73d3 fsck: consider gpgsig headers expected in tags
When we're creating a tag, we want to make sure that gpgsig and
gpgsig-sha256 headers are allowed for the commit.  The default fsck
behavior is to ignore the fact that they're left over, but some of our
tests enable strict checking which flags them nonetheless.  Add
improved checking for these headers as well as documentation and several
tests.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:14 -07:00
brian m. carlson
b95c59e21e rev-parse: allow printing compatibility hash
Right now, we have a way to print the storage hash, the input hash, and
the output hash, but we lack a way to print the compatibility hash.  Add
a new type to --show-object-format, compat, which prints this value.

If no compatibility hash exists, simply print a newline.  This is
important to allow users to use multiple options at once while still
getting unambiguous output.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:14 -07:00
brian m. carlson
d4f439548d docs: add documentation for loose objects
We currently have no documentation for how loose objects are stored.
Let's add some here so it's easy for people to understand how they
work.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:14 -07:00
brian m. carlson
24d46f8633 docs: improve ambiguous areas of pack format documentation
It is fair to say that our pack and indexing code is quite complex.
Contributors who wish to work on this code or implementors of other
implementations would benefit from clear, unambiguous documentation
about how our data formats are structured and encoded and what data is
used in the computation of certain values.  Unfortunately, some of this
data is missing, which leads to confusion and frustration.

Let's document some of this data to help clarify things.  Specify over
what data CRC32 values are computed and also note which CRC32 algorithm
is used, since Wikipedia mentions at least four 32-bit CRC algorithms
and notes that it's possible to use different bit orderings.

In addition, note how we encode objects in the pack.  One might be led
to believe that packed objects are always stored with the "<type>
<size>\0" prefix of loose objects, but that is not the case, although
for obvious reasons this data is included in the computation of the
object ID.  Explain why this is for the curious reader.

Finally, indicate what the size field of the packed object represents.
Otherwise, a reader might think that the size of a delta is the size of
the full object or that it might contain the offset or object ID,
neither of which are the case.  Explain clearly, however, that the
values represent uncompressed sizes to avoid confusion.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:14 -07:00
brian m. carlson
d477892b30 docs: reflect actual double signature for tags
The documentation for the hash function transition reflects the original
design where the SHA-256 signature would always be placed in a header.
However, due to a missed patch in Git 2.29, we shipped SHA-256 support
such that the signature for the current algorithm is always an in-body
signature and the opposite algorithm is always in a header.  Since the
documentation is inaccurate, update it to reflect the correct
information.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:14 -07:00
brian m. carlson
6947ed321d docs: update offset order for pack index v3
The current design of pack index v3 has items in two different orders:
sorted shortened object ID order and pack order.  The shortened object
IDs and the pack index offset values are in the former order and
everything else is in the latter.

This, however, poses some problems.  We have many parts of the packfile
code that expect to find out data about an object knowing only its index
in pack order.  With the current design, to find the pack offset after
having looked up the index in pack order, we must then look up the full
object ID and use that to look up the shortened object ID to find the
pack offset, which is inconvenient, inefficient, and leads to poor cache
usage.

Instead, let's change the offset values to be looked up by pack order.
This works better because once we know the pack order offset, we can
find the full object name and its location in the pack with a simple
index into their respective tables.  This makes many operations much
more efficient, especially with the functions we already have, and it
avoids the need for the revindex with pack index v3.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:14 -07:00
brian m. carlson
87264b7dde docs: update pack index v3 format
Our current pack index v3 format uses 4-byte integers to find the
trailer of the file.  This effectively means that the file cannot be
much larger than 2^32.  While this might at first seem to be okay, we
expect that each object will have at least 64 bytes worth of data, which
means that no more than about 67 million objects can be stored.

Again, this might seem fine, but unfortunately, we know of many users
who attempt to create repos with extremely large numbers of commits to
get a "high score," and we've already seen repositories with at least 55
million commits.  In the interests of gracefully handling repositories
even for these well-intentioned but ultimately misguided users, let's
change these lengths to 8 bytes.

For the checksums at the end of the file, we're producing 32-byte
SHA-256 checksums because that's what we already do with pack index v2
and SHA-256.  Truncating SHA-256 doesn't pose any actual security
problems other than those related to the reduced size, but our pack
checksum must already be 32 bytes (since SHA-256 packs have 32-byte
checksums) and it simplifies the code to use the existing hashfile logic
for these cases for the index checksum as well.

In addition, even though we may not need cryptographic security for the
index checksum, we'd like to avoid arguments from auditors and such for
organizations that may have compliance or security requirements.  Using
the simple, boring choice of the full SHA-256 hash avoids all possible
discussion related to hash truncation and removes impediments for these
organizations.

Note that we do not yet have a pack index v3 implementation in Git, so
it should be fine to change this format.  However, such an
implementation has been written for future inclusion following this
format.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-09 17:46:13 -07:00
Junio C Hamano
e8239f302f Merge branch 'kh/doc-patch-id-markup-fix' into kh/doc-patch-id-1
* kh/doc-patch-id-markup-fix:
  doc: patch-id: fix accidental literal blocks
2025-10-09 17:34:30 -07:00
Junio C Hamano
60f3f52f17 The sixteenth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-08 12:17:55 -07:00
Junio C Hamano
75f8dfabaa Merge branch 'ps/rust-balloon'
Dip our toes a bit to (optionally) use Rust implemented helper
called from our C code.

* ps/rust-balloon:
  ci: enable Rust for breaking-changes jobs
  ci: convert "pedantic" job into full build with breaking changes
  BreakingChanges: announce Rust becoming mandatory
  varint: reimplement as test balloon for Rust
  varint: use explicit width for integers
  help: report on whether or not Rust is enabled
  Makefile: introduce infrastructure to build internal Rust library
  Makefile: reorder sources after includes
  meson: add infrastructure to build internal Rust library
2025-10-08 12:17:55 -07:00