aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
AgeCommit message (Collapse)AuthorFilesLines
3 daysThe fifth batchHEADmastermainJunio C Hamano1-0/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 daysMerge branch 'je/doc-data-model'Junio C Hamano4-2/+311
Add a new manual that describes the data model. * je/doc-data-model: doc: add an explanation of Git's data model
3 daysMerge branch 'jc/whitespace-incomplete-line'Junio C Hamano1-0/+2
Both "git apply" and "git diff" learn a new whitespace error class, "incomplete-line". * jc/whitespace-incomplete-line: attr: enable incomplete-line whitespace error for this project diff: highlight and error out on incomplete lines apply: check and fix incomplete lines whitespace: allocate a few more bits and define WS_INCOMPLETE_LINE apply: revamp the parsing of incomplete lines diff: update the way rewrite diff handles incomplete lines diff: call emit_callback ecbdata everywhere diff: refactor output of incomplete line diff: keep track of the type of the last line seen diff: correct suppress_blank_empty hack diff: emit_line_ws_markup() if/else style fix whitespace: correct bit assignment comments
3 daysMerge branch 'ja/doc-synopsis-style'Junio C Hamano9-404/+426
Doc mark-up updates. * ja/doc-synopsis-style: doc: pull-fetch-param typofix doc: convert git push to synopsis style doc: convert git pull to synopsis style doc: convert git fetch to synopsis style
3 daysMerge branch 'lo/repo-info-all'Junio C Hamano1-3/+3
"git repo info" learned "--all" option. * lo/repo-info-all: repo: add --all to git-repo-info repo: factor out field printing to dedicated function
8 daysThe fourth batchJunio C Hamano1-0/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 daysMerge branch 'ad/blame-diff-algorithm'Junio C Hamano3-20/+23
"git blame" learns "--diff-algorithm=<algo>" option. * ad/blame-diff-algorithm: blame: make diff algorithm configurable xdiff: add 'minimal' to XDF_DIFF_ALGORITHM_MASK
10 daysThe third batchJunio C Hamano1-1/+32
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 daysMerge branch 'kh/doc-commit-extra-references'Junio C Hamano1-4/+6
Doc update. * kh/doc-commit-extra-references: doc: commit: link to git-status(1) on all format options
10 daysMerge branch 'qj/doc-http-bad-want-response'Junio C Hamano1-1/+2
Doc update. * qj/doc-http-bad-want-response: doc: clarify server behavior for invalid 'want' lines in HTTP protocol
10 daysMerge branch 'sa/replay-atomic-ref-updates'Junio C Hamano2-22/+52
"git replay" (experimental) learned to perform ref updates itself in a transaction by default, instead of emitting where each refs should point at and leaving the actual update to another command. * sa/replay-atomic-ref-updates: replay: add replay.refAction config option replay: make atomic ref updates the default behavior replay: use die_for_incompatible_opt2() for option validation
10 daysdoc: pull-fetch-param typofixJean-Noël Avila via GitGitGadget1-1/+1
An earier patch had a typo discovered after it has been merged to 'next'. Fix it. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 daysThe second batchJunio C Hamano1-0/+19
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 daysMerge branch 'kn/maintenance-is-needed'Junio C Hamano1-0/+13
"git maintenance" command learned "is-needed" subcommand to tell if it is necessary to perform various maintenance tasks. * kn/maintenance-is-needed: maintenance: add 'is-needed' subcommand maintenance: add checking logic in `pack_refs_condition()` refs: add a `optimize_required` field to `struct ref_storage_be` reftable/stack: add function to check if optimization is required reftable/stack: return stack segments directly
2025-11-19doc: convert git push to synopsis styleJean-Noël Avila2-179/+201
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-19doc: convert git pull to synopsis styleJean-Noël Avila4-39/+38
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-19doc: convert git fetch to synopsis styleJean-Noël Avila5-188/+189
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-19Start 2.53 cycleJunio C Hamano1-0/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-18repo: add --all to git-repo-infoLucas Seiki Oshiro1-3/+3
Add a new flag `--all` to git-repo-info for requesting values for all the available keys. By using this flag, the user can retrieve all the values instead of searching what are the desired keys for what they wants. Helped-by: Karthik Nayak <karthik.188@gmail.com> Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-17blame: make diff algorithm configurableAntonin Delpeuch3-20/+23
The diff algorithm used in 'git-blame(1)' is set to 'myers', without the possibility to change it aside from the `--minimal` option. There has been long-standing interest in changing the default diff algorithm to "histogram", and Git 3.0 was floated as a possible occasion for taking some steps towards that: https://lore.kernel.org/git/xmqqed873vgn.fsf@gitster.g/ As a preparation for this move, it is worth making sure that the diff algorithm is configurable where useful. Make it configurable in the `git-blame(1)` command by introducing the `--diff-algorithm` option and make honor the `diff.algorithm` config variable. Keep Myers diff as the default. Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-17Git 2.52v2.52.0maintJunio C Hamano1-3/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-14doc: commit: link to git-status(1) on all format optionsKristoffer Haugsbakk1-4/+6
`--branch` and `--long` refer to git-status(1) options but they don’t tell us what `short-format` and `long-format` are, respectively. And `--null` mentions “status” but does not link to the command. Refer to git-config(1) on `--branch` like `--short` does. `long-format` is the git-status(1) output. So we can just say that directly. Replace “status” with a `linkgit` on `--null`. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-13RelNotes: fix typo in release notes for 2.52.0Taylor Blau1-1/+1
Introduced via aea86cf00f (The nineteenth batch, 2025-10-14). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-12whitespace: allocate a few more bits and define WS_INCOMPLETE_LINEJunio C Hamano1-0/+2
Reserve a few more bits in the diff flags word to be used for future whitespace rules. Add WS_INCOMPLETE_LINE without implementing the behaviour (yet). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-12doc: add an explanation of Git's data modelJulia Evans4-2/+311
Git very often uses the terms "object", "reference", or "index" in its documentation. However, it's hard to find a clear explanation of these terms and how they relate to each other in the documentation. The closest candidates currently are: 1. `gitglossary`. This makes a good effort, but it's an alphabetically ordered dictionary and a dictionary is not a good way to learn concepts. You have to jump around too much and it's not possible to present the concepts in the order that they should be explained. 2. `gitcore-tutorial`. This explains how to use the "core" Git commands. This is a nice document to have, but it's not necessary to learn how `update-index` works to understand Git's data model, and we should not be requiring users to learn how to use the "plumbing" commands if they want to learn what the term "index" or "object" means. 3. `gitrepository-layout`. This is a great resource, but it includes a lot of information about configuration and internal implementation details which are not related to the data model. It also does not explain how commits work. The result of this is that Git users (even users who have been using Git for 15+ years) struggle to read the documentation because they don't know what the core terms mean, and it's not possible to add links to help them learn more. Add an explanation of Git's data model. Some choices I've made in deciding what "core data model" means: 1. Omit pseudorefs like `FETCH_HEAD`, because it's not clear to me if those are intended to be user facing or if they're more like internal implementation details. 2. Don't talk about submodules other than by mentioning how they relate to trees. This is because Git has a lot of special features, and explaining how they all work exhaustively could quickly go down a rabbit hole which would make this document less useful for understanding Git's core behaviour. 3. Don't discuss the structure of a commit message (first line, trailers etc). 4. Don't mention configuration. 5. Don't mention the `.git` directory, to avoid getting too much into implementation details Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-12Git 2.52-rc2v2.52.0-rc2Junio C Hamano1-0/+8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-12Merge branch 'dk/meson-html-dir'Junio C Hamano3-10/+10
The build procedure based on meson learned to allow builders to specify the directory to install HTML documents. * dk/meson-html-dir: meson: make GIT_HTML_PATH configurable
2025-11-10maintenance: add 'is-needed' subcommandKarthik Nayak1-0/+13
The 'git-maintenance(1)' command provides tooling to run maintenance tasks over Git repositories. The 'run' subcommand, as the name suggests, runs the maintenance tasks. When used with the '--auto' flag, it uses heuristics to determine if the required thresholds are met for running said maintenance tasks. There is however a lack of insight into these heuristics. Meaning, the checks are linked to the execution. Add a new 'is-needed' subcommand to 'git-maintenance(1)' which allows users to simply check if it is needed to run maintenance without performing it. This subcommand can check if it is needed to run maintenance without actually running it. Ideally it should be used with the '--auto' flag, which would allow users to check if the thresholds required are met. The subcommand also supports the '--task' flag which can be used to check specific maintenance tasks. While adding the respective tests in 't/t7900-maintenance.sh', remove a duplicate of the test: 'worktree-prune task with --auto honors maintenance.worktree-prune.auto'. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Acked-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-06Merge branch 'dk/parseopt-optional-filename-fixes'Junio C Hamano1-1/+1
A recently added configuration variable and command line option syntax ":(optional)" for values that are of filename type inconsistently behaved on an empty file (configuration took it happily, while the command line option pretended as if it did not exist), which has been corrected. * dk/parseopt-optional-filename-fixes: parseopt: remove unreachable code parseopt: restore const qualifier to parsed filename config: use boolean type for a simple flag parseopt: use boolean type for a simple flag doc: clarify command equivalence comment parseopt: fix :(optional) at command line to only ignore missing files
2025-11-06meson: make GIT_HTML_PATH configurableD. Ben Knoble3-10/+10
Makefile-based builds can configure Git's internal HTML_PATH by defining htmldir, which is useful for packagers that put documentation in different locations. Gentoo, for example, uses version-suffixed directories like ${prefix}/share/doc/git-2.51 and puts the HTML documentation in an 'html' subdirectory of the same. Propagate the same configuration knob to Meson-based builds so that "git --html-path" on such systems can be configured to output the correct directory. Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-06doc: clarify server behavior for invalid 'want' lines in HTTP protocolQueen Ediri Jessa1-1/+2
Update the documentation to clearly describe how the server responds when a client sends an invalid or malformed `want` line during the HTTP protocol exchange. The server includes the offending object name in its error message. Signed-off-by: Queen Ediri Jessa <qjessa662@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-05Git 2.52-rc1v2.52.0-rc1Junio C Hamano1-0/+7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-05Merge branch 'rz/t0450-bisect-doc-update'Junio C Hamano1-17/+26
The help text and manual page of "git bisect" command have been made consistent with each other. * rz/t0450-bisect-doc-update: bisect: update usage and docs to match each other
2025-11-05replay: add replay.refAction config optionSiddharth Asthana2-0/+13
Add a configuration variable to control the default behavior of git replay for updating references. This allows users who prefer the traditional pipeline output to set it once in their config instead of passing --ref-action=print with every command. The config variable uses string values that mirror the behavior modes: * replay.refAction = update (default): atomic ref updates * replay.refAction = print: output commands for pipeline Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Elijah Newren <newren@gmail.com> Helped-by: Christian Couder <christian.couder@gmail.com> Helped-by: Phillip Wood <phillip.wood123@gmail.com> Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-05replay: make atomic ref updates the default behaviorSiddharth Asthana1-22/+39
The git replay command currently outputs update commands that can be piped to update-ref to achieve a rebase, e.g. git replay --onto main topic1..topic2 | git update-ref --stdin This separation had advantages for three special cases: * it made testing easy (when state isn't modified from one step to the next, you don't need to make temporary branches or have undo commands, or try to track the changes) * it provided a natural can-it-rebase-cleanly (and what would it rebase to) capability without automatically updating refs, similar to a --dry-run * it provided a natural low-level tool for the suite of hash-object, mktree, commit-tree, mktag, merge-tree, and update-ref, allowing users to have another building block for experimentation and making new tools However, it should be noted that all three of these are somewhat special cases; users, whether on the client or server side, would almost certainly find it more ergonomic to simply have the updating of refs be the default. For server-side operations in particular, the pipeline architecture creates process coordination overhead. Server implementations that need to perform rebases atomically must maintain additional code to: 1. Spawn and manage a pipeline between git-replay and git-update-ref 2. Coordinate stdout/stderr streams across the pipe boundary 3. Handle partial failure states if the pipeline breaks mid-execution 4. Parse and validate the update-ref command output Change the default behavior to update refs directly, and atomically (at least to the extent supported by the refs backend in use). This eliminates the process coordination overhead for the common case. For users needing the traditional pipeline workflow, add a new --ref-action=<mode> option that preserves the original behavior: git replay --ref-action=print --onto main topic1..topic2 | git update-ref --stdin The mode can be: * update (default): Update refs directly using an atomic transaction * print: Output update-ref commands for pipeline use Test suite changes: All existing tests that expected command output now use --ref-action=print to preserve their original behavior. This keeps the tests valid while allowing them to verify that the pipeline workflow still works correctly. New tests were added to verify: - Default atomic behavior (no output, refs updated directly) - Bare repository support (server-side use case) - Equivalence between traditional pipeline and atomic updates - Real atomicity using a lock file to verify all-or-nothing guarantee - Test isolation using test_when_finished to clean up state - Reflog messages include replay mode and target A following commit will add a replay.refAction configuration option for users who prefer the traditional pipeline output as their default behavior. Helped-by: Elijah Newren <newren@gmail.com> Helped-by: Patrick Steinhardt <ps@pks.im> Helped-by: Christian Couder <christian.couder@gmail.com> Helped-by: Phillip Wood <phillip.wood123@gmail.com> Signed-off-by: Siddharth Asthana <siddharthasthana31@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-04doc: clarify command equivalence commentD. Ben Knoble1-1/+1
Documentation of command parsing for :(optional) includes a terse comment; expand it to be clearer to readers. Suggested-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-04A bit more before rc1Junio C Hamano1-0/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-04Merge branch 'jk/doc-backslash-in-exclude'Junio C Hamano1-0/+5
The patterns used in the .gitignore files use backslash in the way documented for fnmatch(3); document as such to reduce confusion. * jk/doc-backslash-in-exclude: doc: document backslash in gitignore patterns
2025-11-04Merge branch 'kh/doc-checkout-markup-fix'Junio C Hamano1-2/+2
Doc mark-up fix. * kh/doc-checkout-markup-fix: doc: git-checkout: fix placeholder markup
2025-11-04Merge branch 'qj/doc-my1stcontrib-email-verify'Junio C Hamano1-0/+5
The "MyFirstContribution" tutorial tells the reader how to send out their patches; the section gained a hint to verify the message reached the mailing list. * qj/doc-my1stcontrib-email-verify: MyFirstContribution: add note on confirming patches
2025-11-04Merge branch 'jt/repo-structure'Junio C Hamano1-0/+30
"git repo structure", a new command. * jt/repo-structure: builtin/repo: add progress meter for structure stats builtin/repo: add keyvalue and nul format for structure stats builtin/repo: add object counts in structure output builtin/repo: introduce structure subcommand ref-filter: export ref_kind_from_refname() ref-filter: allow NULL filter pattern builtin/repo: rename repo_info() to cmd_repo_info()
2025-11-04Merge branch 'cc/doc-submitting-patches-with-ai'Junio C Hamano1-0/+28
AI guidelines. * cc/doc-submitting-patches-with-ai: SubmittingPatches: add section about AI
2025-11-04Merge branch 'ps/ref-peeled-tags' into kn/maintenance-is-neededJunio C Hamano1-0/+30
* ps/ref-peeled-tags: (23 commits) t7004: do not chdir around in the main process ref-filter: fix stale parsed objects ref-filter: parse objects on demand ref-filter: detect broken tags when dereferencing them refs: don't store peeled object IDs for invalid tags object: add flag to `peel_object()` to verify object type refs: drop infrastructure to peel via iterators refs: drop `current_ref_iter` hack builtin/show-ref: convert to use `reference_get_peeled_oid()` ref-filter: propagate peeled object ID upload-pack: convert to use `reference_get_peeled_oid()` refs: expose peeled object ID via the iterator refs: refactor reference status flags refs: fully reset `struct ref_iterator::ref` on iteration refs: introduce `.ref` field for the base iterator refs: introduce wrapper struct for `each_ref_fn` builtin/repo: add progress meter for structure stats builtin/repo: add keyvalue and nul format for structure stats builtin/repo: add object counts in structure output builtin/repo: introduce structure subcommand ...
2025-11-03Git 2.52-rc0v2.52.0-rc0Junio C Hamano1-0/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-11-03Merge branch 'ps/maintenance-geometric'Junio C Hamano1-8/+41
"git maintenance" command learns the "geometric" strategy where it avoids doing maintenance tasks that rebuilds everything from scratch. * ps/maintenance-geometric: t7900: fix a flaky test due to git-repack always regenerating MIDX builtin/maintenance: introduce "geometric" strategy builtin/maintenance: make "gc" strategy accessible builtin/maintenance: extend "maintenance.strategy" to manual maintenance builtin/maintenance: run maintenance tasks depending on type builtin/maintenance: improve readability of strategies builtin/maintenance: don't silently ignore invalid strategy builtin/maintenance: make the geometric factor configurable builtin/maintenance: introduce "geometric-repack" task builtin/gc: make `too_many_loose_objects()` reusable without GC config builtin/gc: remove global `repack` variable
2025-11-03Merge branch 'kh/doc-patch-id-1'Junio C Hamano1-11/+11
* kh/doc-patch-id-1: doc: patch-id: convert to the modern synopsis style
2025-10-30The 27th batchJunio C Hamano1-0/+23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-30Merge branch 'ps/symlink-symref-deprecation'Junio C Hamano2-0/+23
"Symlink symref" has been added to the list of things that will disappear at Git 3.0 boundary. * ps/symlink-symref-deprecation: refs/files: deprecate writing symrefs as symbolic links
2025-10-30Merge branch 'ey/commit-graph-changed-paths-config'Junio C Hamano2-1/+12
A new configuration variable commitGraph.changedPaths allows to turn "--changed-paths" on by default for "git commit-graph". * ey/commit-graph-changed-paths-config: commit-graph: add new config for changed-paths & recommend it in scalar
2025-10-29The 26th batchJunio C Hamano1-0/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-29doc: document backslash in gitignore patternsJeff King1-0/+5
Because gitignore patterns are passed to fnmatch, the handling of backslashes is the same as it is there: it can be used to escape metacharacters. We do reference fnmatch(3) for more details, but it may be friendlier to point out this implication explicitly (especially for people who want to know about backslash handling and search the documentation for that word). There are also two cases that I've seen some other backslash-escaping systems handle differently, so let's describe those: 1. A backslash before any character treats that character literally, even if it's not otherwise a meta-character. As opposed to including the backslash itself (like "foo\bar" in shell expands to "foo\bar") or forbidding it ("foo\zar" is required to produce a diagnostic in C). 2. A backslash at the end of the string is an invalid pattern (and not a literal backslash). This second one in particular was a point of confusion between our implementation and the one in JGit. Our wildmatch behavior matches what POSIX specifies for fnmatch, so the code and documentation are in line. But let's add a test to cover this case. Note that the behavior here differs between wildmatch itself (which is what gitignore will use) and pathspec matching (which will only turn to wildmatch if a literal match fails). So we match "foo\" to "foo\" in pathspecs, but not via gitignore. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-28bisect: update usage and docs to match each otherRuoyu Zhong1-17/+26
Update the usage string of `git bisect` and documentation to match each other. While at it, also: 1. Move the synopsis of `git bisect` subcommands to the synopsis section, so that the test `t0450-txt-doc-vs-help.sh` can pass. 2. Document the `git bisect next` subcommand, which exists in the code but is missing from the documentation. See also: [1]. [1]: https://lore.kernel.org/git/3DA38465-7636-4EEF-B074-53E4628F5355@gmail.com/ Suggested-by: Ben Knoble <ben.knoble@gmail.com> Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-28doc: git-checkout: fix placeholder markupKristoffer Haugsbakk1-2/+2
The placeholder markup is underscore (_), not backtick (`) as well. The inline-verbatim markup (backticks) handle interior formatting. This means in this case that it applies HTML `<code>` to the underscores and `<em>` to the placeholder. That is the effect, anyway; we can see from the rest of 042d6f34 (doc: git-checkout: clarify `-b` and `-B`, 2025-09-10) that this was probably an unintended mix-up. Acked-by: Julia Evans <julia@jvns.ca> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-28The 25th batchJunio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-28Merge branch 'cc/fast-import-strip-signed-tags'Junio C Hamano2-15/+38
"git fast-import" is taught to handle signed tags, just like it recently learned to handle signed commits, in different ways. * cc/fast-import-strip-signed-tags: fast-import: add '--signed-tags=<mode>' option fast-export: handle all kinds of tag signatures t9350: properly count annotated tags lib-gpg: allow tests with GPGSM or GPGSSH prereq first doc: git-tag: stop focusing on GPG signed tags
2025-10-28Merge branch 'ds/sparse-checkout-clean'Junio C Hamano1-1/+32
"git sparse-checkout" subcommand learned a new "clean" action to prune otherwise unused working-tree files that are outside the areas of interest. * ds/sparse-checkout-clean: sparse-index: improve advice message instructions t: expand tests around sparse merges and clean sparse-index: point users to new 'clean' action sparse-checkout: add --verbose option to 'clean' dir: add generic "walk all files" helper sparse-checkout: match some 'clean' behavior sparse-checkout: add basics of 'clean' command sparse-checkout: remove use of the_repository
2025-10-27MyFirstContribution: add note on confirming patchesQueen Ediri Jessa1-0/+5
Add a note after the `git send-email` section explaining how contributors can confirm that their patches reached the mailing list by checking https://lore.kernel.org/git/. This helps contributors verify that their emails were successfully delivered. Signed-off-by: Queen Ediri Jessa <qjessa662@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-26Sync with Git 2.51.2Junio C Hamano2-54/+45
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-26Git 2.51.2v2.51.2Junio C Hamano1-0/+45
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-26Merge branch 'kh/doc-continued-paragraph-fix' into maint-2.51Junio C Hamano5-48/+64
Doc mark-up fixes. * kh/doc-continued-paragraph-fix: doc: fix accidental literal blocks
2025-10-24The twenty-fourth batchJunio C Hamano1-0/+24
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24Merge branch 'rs/add-patch-document-p-for-pager'Junio C Hamano1-0/+1
Show 'P'ipe command in "git add -p". * rs/add-patch-document-p-for-pager: add-patch: fully document option P
2025-10-24Merge branch 'rj/doc-technical-fixes'Junio C Hamano6-412/+507
Documentation mark-up fixes. * rj/doc-technical-fixes: doc: add large-object-promisors.adoc to the docs build doc: commit-graph.adoc: fix up some formatting doc: sparse-checkout.adoc: fix asciidoc warnings doc: remembering-renames.adoc: fix asciidoc warnings
2025-10-24builtin/maintenance: introduce "geometric" strategyPatrick Steinhardt1-0/+9
We have two different repacking strategies in Git: - The "gc" strategy uses git-gc(1). - The "incremental" strategy uses multi-pack indices and `git multi-pack-index repack` to merge together smaller packfiles as determined by a specific batch size. The former strategy is our old and trusted default, whereas the latter has historically been used for our scheduled maintenance. But both strategies have their shortcomings: - The "gc" strategy performs regular all-into-one repacks. Furthermore it is rather inflexible, as it is not easily possible for a user to enable or disable specific subtasks. - The "incremental" strategy is not a full replacement for the "gc" strategy as it doesn't know to prune stale data. So today, we don't have a strategy that is well-suited for large repos while being a full replacement for the "gc" strategy. Introduce a new "geometric" strategy that aims to fill this gap. This strategy invokes all the usual cleanup tasks that git-gc(1) does like pruning reflogs and rerere caches as well as stale worktrees. But where it differs from both the "gc" and "incremental" strategy is that it uses our geometric repacking infrastructure exposed by git-repack(1) to repack packfiles. The advantage of geometric repacking is that we only need to perform an all-into-one repack when the object count in a repo has grown significantly. One downside of this strategy is that pruning of unreferenced objects is not going to happen regularly anymore. Every geometric repack knows to soak up all loose objects regardless of their reachability, and merging two or more packs doesn't consider reachability, either. Consequently, the number of unreachable objects will grow over time. This is remedied by doing an all-into-one repack instead of a geometric repack whenever we determine that the geometric repack would end up merging all packfiles anyway. This all-into-one repack then performs our usual reachability checks and writes unreachable objects into a cruft pack. As cruft packs won't ever be merged during geometric repacks we can thus phase out these objects over time. Of course, this still means that we retain unreachable objects for far longer than with the "gc" strategy. But the maintenance strategy is intended especially for large repositories, where the basic assumption is that the set of unreachable objects will be significantly dwarfed by the number of reachable objects. If this assumption is ever proven to be too disadvantageous we could for example introduce a time-based strategy: if the largest packfile has not been touched for longer than $T, we perform an all-into-one repack. But for now, such a mechanism is deferred into the future as it is not clear yet whether it is needed in the first place. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24builtin/maintenance: make "gc" strategy accessiblePatrick Steinhardt1-0/+2
While the user can pick the "incremental" maintenance strategy, it is not possible to explicitly use the "gc" strategy. This has two downsides: - It is impossible to use the default "gc" strategy for a specific repository when the strategy was globally set to a different strategy. - It is not possible to use git-gc(1) for scheduled maintenance. Address these issues by making making the "gc" strategy configurable. Furthermore, extend the strategy so that git-gc(1) runs for both manual and scheduled maintenance. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24builtin/maintenance: extend "maintenance.strategy" to manual maintenancePatrick Steinhardt1-8/+14
The "maintenance.strategy" configuration allows users to configure how Git is supposed to perform repository maintenance. The idea is that we provide a set of high-level strategies that may be useful in different contexts, like for example when handling a large monorepo. Furthermore, the strategy can be tweaked by the user by overriding specific tasks. In its current form though, the strategy only applies to scheduled maintenance. This creates something of a gap, as scheduled and manual maintenance will now use _different_ strategies as the latter would continue to use git-gc(1) by default. This makes the strategies way less useful than they could be on the one hand. But even more importantly, the two different strategies might clash with one another, where one of the strategies performs maintenance in such a way that it discards benefits from the other strategy. So ideally, it should be possible to pick one strategy that then applies globally to all the different ways that we perform maintenance. This doesn't necessarily mean that the strategy always does the _same_ thing for every maintenance type. But it means that the strategy can configure the different types to work in tandem with each other. Change the meaning of "maintenance.strategy" accordingly so that the strategy is applied to both types, manual and scheduled. As preceding commits have introduced logic to run maintenance tasks depending on this type we can tweak strategies so that they perform those tasks depending on the context. Note that this raises the question of backwards compatibility: when the user has configured the "incremental" strategy we would have ignored that strategy beforehand. Instead, repository maintenance would have continued to use git-gc(1) by default. But luckily, we can match that behaviour by: - Keeping all current tasks of the incremental strategy as `MAINTENANCE_TYPE_SCHEDULED`. This ensures that those tasks will not run during manual maintenance. - Configuring the "gc" task so that it is invoked during manual maintenance. Like this, the user shouldn't observe any difference in behaviour. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24builtin/maintenance: make the geometric factor configurablePatrick Steinhardt1-0/+5
The geometric repacking task uses a factor of two for its geometric sequence, meaning that each next pack must contain at least twice as many objects as the next-smaller one. In some cases it may be helpful to configure this factor though to reduce the number of packfile merges even further, e.g. in very big repositories. But while git-repack(1) itself supports doing this, the maintenance task does not give us a way to tune it. Introduce a new "maintenance.geometric-repack.splitFactor" configuration to plug this gap. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24builtin/maintenance: introduce "geometric-repack" taskPatrick Steinhardt1-0/+11
Introduce a new "geometric-repack" task. This task uses our geometric repack infrastructure as provided by git-repack(1) itself, which is a strategy that especially hosting providers tend to use to amortize the costs of repacking objects. There is one issue though with geometric repacks, namely that they unconditionally pack all loose objects, regardless of whether or not they are reachable. This is done because it means that we can completely skip the reachability step, which significantly speeds up the operation. But it has the big downside that we are unable to expire objects over time. To address this issue we thus use a split strategy in this new task: whenever a geometric repack would merge together all packs, we instead do an all-into-one repack. By default, these all-into-one repacks have cruft packs enabled, so unreachable objects would now be written into their own pack. Consequently, they won't be soaked up during geometric repacking anymore and can be expired with the next full repack, assuming that their expiry date has surpassed. Signed-off-by: Patrick Steinhardt <ps@pks.im> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24The twenty-third batchJunio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-22The twenty-second batchJunio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-22Merge branch 'je/doc-pull'Junio C Hamano2-53/+41
Documentation updates. * je/doc-pull: doc: git-pull: clarify how to exit a conflicted merge doc: git-pull: delete the example doc: git-pull: clarify options for integrating remote branch doc: git-pull: move <repository> and <refspec> params
2025-10-22Merge branch 'bc/sha1-256-interop-01'Junio C Hamano7-26/+111
The beginning of SHA1-SHA256 interoperability work. * bc/sha1-256-interop-01: t1010: use BROKEN_OBJECTS prerequisite t: allow specifying compatibility hash fsck: consider gpgsig headers expected in tags rev-parse: allow printing compatibility hash docs: add documentation for loose objects docs: improve ambiguous areas of pack format documentation docs: reflect actual double signature for tags docs: update offset order for pack index v3 docs: update pack index v3 format
2025-10-22commit-graph: add new config for changed-paths & recommend it in scalarEmily Yang2-1/+12
The changed-path Bloom filters feature has proven stable and reliable over several years of use, delivering significant performance improvement for file history computation in large monorepos. Currently a user can opt-in to writing the changed-path Bloom filters using the "--changed-paths" option to "git commit-graph write". The filters will be persisted until the user drops the filters using the "--no-changed-paths" option. For this functionality, refer to 0087a87ba8 (commit-graph: persist existence of changed-paths, 2020-07-01). Large monorepos using Git's background maintenance to build and update commit-graph files could use an easy switch to enable this feature without a foreground computation. In this commit, we're proposing a new config option "commitGraph.changedPaths": * If "true", "git commit-graph write" will write Bloom filters, equivalent to passing "--changed-paths"; * If "false" or "unset", Bloom filters will be written during "git commit-graph write" only if the filters already exist in the current commit-graph file. This matches the default behaviour of "git commit-graph write" without any "--[no-]changed-paths" option. Note "false" can disable a previous "true" config value but doesn't imply "--no-changed-paths". This config will always respect the precedence of command line option "--[no-]changed-paths". We also set this new config as optional recommended config in scalar to turn on this feature for large repos. Helped-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Emily Yang <emilyyang.git@gmail.com> Acked-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-22Merge branch 'jt/repo-structure' into ps/ref-peeled-tagsJunio C Hamano1-0/+30
* jt/repo-structure: builtin/repo: add progress meter for structure stats builtin/repo: add keyvalue and nul format for structure stats builtin/repo: add object counts in structure output builtin/repo: introduce structure subcommand ref-filter: export ref_kind_from_refname() ref-filter: allow NULL filter pattern builtin/repo: rename repo_info() to cmd_repo_info()
2025-10-21builtin/repo: add keyvalue and nul format for structure statsJustin Tobler1-3/+22
All repository structure stats are outputted in a human-friendly table form. This format is not suitable for machine parsing. Add a --format option that supports three output modes: `table`, `keyvalue`, and `nul`. The `table` mode is the default format and prints the same table output as before. With the `keyvalue` mode, each line of output contains a key-value pair of a repository stat. The '=' character is used to delimit between keys and values. The `nul` mode is similar to `keyvalue`, but key-values are delimited by a NUL character instead of a newline. Also, instead of a '=' character to delimit between keys and values, a newline character is used. This allows stat values to support special characters without having to cquote them. These two new modes provides output that is more machine-friendly. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-21builtin/repo: add object counts in structure outputJustin Tobler1-0/+1
The amount of objects in a repository can provide insight regarding its shape. To surface this information, use the path-walk API to count the number of reachable objects in the repository by object type. All regular references are used to determine the reachable set of objects. The object counts are appended to the same table containing the reference information. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-21builtin/repo: introduce structure subcommandJustin Tobler1-0/+10
The structure of a repository's history can have huge impacts on the performance and health of the repository itself. Currently, Git lacks a means to surface repository metrics regarding its structure/shape via a single command. Acquiring this information requires users to be familiar with the relevant data points and the various Git commands required to surface them. To fill this gap, supplemental tools such as git-sizer(1) have been developed. To allow users to more readily identify repository structure related information, introduce the "structure" subcommand in git-repo(1). The goal of this subcommand is to eventually provide similar functionality to git-sizer(1), but natively in Git. The initial version of this command only iterates through all references in the repository and tracks the count of branches, tags, remote refs, and other reference types. The corresponding information is displayed in a human-friendly table formatted in a very similar manner to git-sizer(1). The width of each table column is adjusted automatically to satisfy the requirements of the widest row contained. Subsequent commits will surface additional relevant data points to output and also provide other more machine-friendly output formats. Based-on-patch-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-21add-patch: fully document option PRené Scharfe1-0/+1
Show option P in the prompt and explain it properly on a dedicated line in online help and documentation. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-20The twenty-first batchJunio C Hamano1-0/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-20Merge branch 'kh/doc-continued-paragraph-fix'Junio C Hamano5-48/+64
Doc mark-up fixes. * kh/doc-continued-paragraph-fix: doc: fix accidental literal blocks
2025-10-20Merge branch 'dk/stash-apply-index'Junio C Hamano1-0/+4
Doc update. * dk/stash-apply-index: doc: explain the impact of stash.index on --autostash options
2025-10-17The twentieth batchJunio C Hamano1-0/+17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-17Merge branch 'tb/doc-submitting-patches'Junio C Hamano1-8/+21
A few more things that patch authors can do to help maintainer to keep track of their topics better. * tb/doc-submitting-patches: SubmittingPatches: guidance for multi-series efforts SubmittingPatches: extend release-notes experiment to topic names
2025-10-17Merge branch 'rs/add-patch-options-fix'Junio C Hamano1-4/+4
The code in "git add -p" and friends to iterate over hunks was riddled with bugs, which has been corrected. * rs/add-patch-options-fix: add-patch: reset "permitted" at loop start add-patch: let options a and d roll over like y and n add-patch: let options k and K roll over like j and J add-patch: let options y, n, j, and e roll over to next undecided add-patch: document that option J rolls over add-patch: improve help for options j, J, k, and K
2025-10-16doc: add large-object-promisors.adoc to the docs buildRamsay Jones3-32/+34
Commit 5040f9f164 ("doc: add technical design doc for large object promisors", 2025-02-18) added the large object promisors document as a technical document (with a '.txt' extension). The merge commit 2c6fd30198 ("Merge branch 'cc/lop-remote'", 2025-03-05) seems to have renamed the file with an '.adoc' extension. Despite the '.adoc' extension, this document was not being formatted by asciidoc(tor) as part of the docs build. In order to do so, add the document to the make and meson build files. Having added the document to the build, asciidoc and asciidoctor find (slightly different) problems with the syntax of the input document. The first set of warnings (only issued by asciidoc) relate to some 'section title out of sequence: expected level 3, got level 4'. This document uses 'setext' style of section headers, using a series of underline characters, where the character used denotes the level of the title. From document title to level 5 (see [1]), these characters are =, -, ~, ^, +. This does not seem to fit the error message, which implies that those characters denote levels 0 -> 4. Replacing the headings underlined with '+' by the '^' character eliminates these warnings. The second set of warnings (only issued by asciidoctor) relate to some headings which seem to use both arabic and roman numerals as part of a single 'list' sequence. This elicited either 'unterminated listing block' or (for example) 'list item index: expected I, got II' warnings. In order not to mix arabic and roman numerals, remove the numeral from the '0) Non goals' heading. Similarly, the remaining roman numeral entries had the ')' removed and turned into regular headings with I, II, III ... at the beginning. [1] https://asciidoctor.org/docs/asciidoc-recommended-practices/ Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16doc: commit-graph.adoc: fix up some formattingRamsay Jones1-10/+19
The formatting markup syntax used in this document (markdown?) is not interpreted correctly by asciidoc or asciidoctor. The main problem is the use of a '## ' prefix markup for some sub-headings, along with the use of '```' code markup and some missing literal blocks. In order to improve the (html) document formatting: - replace the '## ' prefix sub-title syntax with the '~~' underlining syntax for the relevant sub-headings. - replace the '```' code markup, which causes asciidoc(tor) to simply remove the marked up text, with a literal block '----' markup. - the second ascii diagram, in the 'Merging commit-graph files' section, is not rendered correctly by asciidoctor (asciidoc is fine) so enclose it in a '....' block. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16doc: sparse-checkout.adoc: fix asciidoc warningsRamsay Jones1-328/+376
Both asciidoc and asciidoctor issue warnings about 'list item index: expected n got n-1' for n=1->7 on lines 928, 931, 951, 974, 980, 1033 and 1049. In asciidoc, numbered lists must start at one, whereas this file has a list starting at zero. Also, asciidoc and asciidoctor warn about 'section title out of sequence: expected level 1, got level 2' on line 17. (asciidoc only complains about the first instance of this, while asciidoctor complains about them all, on lines 95, 258, 303, 316, 545, 612, 752, 824, 895, 923 and 1053). These warnings stem from the section titles not being correctly nested within a document/chapter title. In order to address the first set of warnings, simply renumber the list from one to seven, rather than zero to six. Fortunately, this does not require altering additional text, since the enumeration of 'Known Bugs' is not referred to anywhere else in the document. In order to address the second set of warnings, change the section title syntax from '=== title ===' to '== title ==', effectively reducing the nesting level of the title by one. Also, some apparent (sub-)titles are not marked up with sub-title syntax, so add some '=== ' prefix(s) to the relevant headings. In addition to the warnings, address some other formatting issues: - the use of heavily nested unordered lists is not reflected in the output (making the file totally unreadable) because each level of nesting requires a different syntax. (i.e. replace '*' with '**' for the second level, '*' with '***' for the third level, etc.) - make use of literal blocks and manual indentation to get asciidoc and asciidoctor to display even remotely similar output. - make use of labelled lists, in some places, to get a similar looking output to the input, for both asciidoc and asciidoctor. - replace the trailing space in: `git grep ${SEARCH_TERM} OLDREV ` otherwise the entire line in which that appears is removed from the output. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16doc: remembering-renames.adoc: fix asciidoc warningsRamsay Jones1-42/+78
Both asciidoc and ascidoctor issue warnings about 'list item index: expected n got n-1' for n=1->9 on lines 13, 15, 17, 20, 23, 25, 29, 31 and 33. In asciidoc, numbered lists must start at one, whereas this file has a list starting at zero. Also, asciidoc and asciidoctor warn about 'section title out of sequence: expected level 1, got level 2' on line 38. (asciidoc only complains about the first instance of this, while asciidoctor complains about them all, on lines 94, 141, 142, 184, 185, 257, 288, 289, 290, 397, 424, 485, 486 and 487). These warnings stem from the section titles not being correctly nested within a document/chapter title. In order to address the first set of warnings, simply renumber the list from one to nine, rather than zero to eight. This also requires altering the text which refers to the section numbers, including other section titles. In order to address the second set of warnings, change the section title syntax from '=== title ===' to '== title ==', effectively reducing the nesting level of the title by one. Also, some of the titles are given over multiple lines (they are very long), with an title '===' prefix on each line. This leads to them being treated as separate sections with no body text (as you can see from the line numbers given for the asciidoctor warnings, above). So, for these titles, turn them into a single (long) line of text. In addition to the warnings, address some other formatting issues: - the ascii branch diagrams didn't format correctly on asciidoctor so include them in a literal block. - several blocks of text were intended to be formatted 'as is' but were not included in a literal block. - in section 8, format the (A)->(D) in the text description as a literal with `` marks, since (C) is rendered as a copyright symbol in html otherwise. - in section 9, a sub-list of two items is not formatted as such. change the '*' introducer to '**' to correct the sub-list format. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-16RelNotes: sync with Git 2.51.1 fixupsKristoffer Haugsbakk1-5/+5
Carry over the fixups from 8c3d7c5f (RelNotes: minor fixups before 2.51.1, 2025-10-15). Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: clarify how to exit a conflicted mergeJulia Evans1-9/+3
From user feedback: - One user is confused about why `git reset --merge` (why not just `git reset`?). Handle this by mentioning `git merge --abort` and `git reset --abort` instead, which have a more obvious meaning. - 2 users want to know what "In older versions of Git" means exactly (in versions older than 1.7.0). Handle this by removing the warning since it was added 15 years ago (in 3f8fc184c0e2c) Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: delete the exampleJulia Evans1-26/+0
From user feedback: this example is confusing because it implies that `git pull` will run `git merge` by default, but the default is `--ff-only`. We could instead show an example of a fast-forward merge, but that may not add a lot since fast-forward merges are relatively simple. This lets us keep the description short. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: clarify options for integrating remote branchJulia Evans1-11/+20
From user feedback: - One user is confused about the current default ("I was convinced that the git default was still to merge on pull") - One user is confused about why "git fetch" isn't mentioned earlier - One user says they always forget what the arguments to `git pull` are and that it's not immediately obvious that `--no-rebase` means "merge" - One user wants `--ff-only` to be mentioned Resolve this by listing the options for integrating the the remote branch. This should help users figure out at a glance which one they want to do, and make it clearer that --ff-only is the default. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15doc: git-pull: move <repository> and <refspec> paramsJulia Evans2-11/+22
From user feedback: - it's confusing that we use both <branch> and <refspec> to refer to the second argument - one user is not clear about what `refs/heads/*:refs/remotes/origin/*` is meant to be an example of ("is it like a path?") The DESCRIPTION section is also doing a lot right now: it's trying to describe both how the <repository> and <refspec> arguments work (which is pretty complex, as seen in the DEFAULT BEHAVIOUR section) as well as how `git pull` calls `git fetch` and merge/rebase/etc depending on the arguments. Handle this by moving the description of the <repository> and <refspec> arguments to the OPTIONS section, so that we can focus on the merge/rebase/etc behaviour in the DESCRIPTION section, and refer folks to the later sections for details. Use the term "upstream" instead of 'the "remote" and "merge" configuration for the current branch' since users are more likely to know what an "upstream" is. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15Sync with Git 2.51.1Junio C Hamano1-7/+60
2025-10-15Git 2.51.1v2.51.1Junio C Hamano1-0/+53
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15Merge branch 'kh/doc-patch-id-markup-fix' into maint-2.51Junio C Hamano1-20/+23
Documentation mark-up fix. * kh/doc-patch-id-markup-fix: doc: patch-id: fix accidental literal blocks
2025-10-15Merge branch 'ja/doc-markup-attached-paragraph-fix' into maint-2.51Junio C Hamano2-15/+17
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-15Merge branch 'en/doc-merge-tree-describe-merge-base' into maint-2.51Junio C Hamano1-4/+10
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-15Merge branch 'mh/doc-credential-url-prefix' into maint-2.51Junio C Hamano1-8/+7
Doc update to describe a feature that has already been implemented. * mh/doc-credential-url-prefix: docs/gitcredentials: describe URL prefix matching
2025-10-15Merge branch 'ag/doc-sendmail-gmail-example-update' into maint-2.51Junio C Hamano1-4/+4
Doc update. * ag/doc-sendmail-gmail-example-update: docs: update sendmail docs to use more secure SMTP server for Gmail
2025-10-15Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix' into maint-2.51Junio C Hamano1-5/+4
Doc mark-up fix. * jc/doc-includeif-hasconfig-remote-url-fix: config: document includeIf conditions consistently
2025-10-15Merge branch 'mm/worktree-doc-typofix' into maint-2.51Junio C Hamano1-1/+1
Docfix. * mm/worktree-doc-typofix: docs: fix typo in worktree.adoc 'extension'
2025-10-15Merge branch 'kh/doc-markup-fixes' into maint-2.51Junio C Hamano3-3/+3
Doc markup fixes. * kh/doc-markup-fixes: doc: remove extra backtick for inline-verbatim doc: add missing backtick for inline-verbatim
2025-10-15Merge branch 'km/alias-doc-markup-fix' into maint-2.51Junio C Hamano1-1/+1
Docfix. * km/alias-doc-markup-fix: doc: fix formatting of function-wrap shell alias
2025-10-15Merge branch 'js/doc-sending-patch-via-thunderbird' into maint-2.51Junio C Hamano1-3/+9
Doc update. * js/doc-sending-patch-via-thunderbird: doc/format-patch: adjust Thunderbird MUA hint to new add-on
2025-10-15Merge branch 'kr/clone-synopsis-fix' into maint-2.51Junio C Hamano1-1/+1
Doc fix. * kr/clone-synopsis-fix: docs: remove stray bracket from git-clone synopsis
2025-10-15Merge branch 'kh/doc-git-log-markup-fix' into maint-2.51Junio C Hamano1-2/+2
Doc update. * kh/doc-git-log-markup-fix: doc: git-log: fix description list
2025-10-15Merge branch 'ps/reflog-migrate-fixes' into maint-2.51Junio C Hamano1-44/+52
"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-15RelNotes: minor fixups before 2.51.1Kristoffer Haugsbakk1-7/+7
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-15refs/files: deprecate writing symrefs as symbolic linksPatrick Steinhardt2-0/+23
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-14Sync with 'maint'Junio C Hamano1-0/+46
2025-10-14Prepare for 2.51.1Junio C Hamano1-0/+46
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-14Merge branch 'kh/doc-fast-import-markup-fix' into maint-2.51Junio C Hamano1-4/+4
Doc mark-up fix. * kh/doc-fast-import-markup-fix: doc: fast-import: replace literal block with paragraph
2025-10-14Merge branch 'kh/doc-config-typofix' into maint-2.51Junio C Hamano1-1/+1
Documentation typofix. * kh/doc-config-typofix: doc: config: replace backtick with apostrophe for possessive
2025-10-14Merge branch 'kh/doc-interpret-trailers-markup-fix' into maint-2.51Junio C Hamano1-4/+4
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-14Merge branch 'ds/doc-count-objects-fix' into maint-2.51Junio C Hamano1-0/+2
Docfix. * ds/doc-count-objects-fix: count-objects: document count-objects pack
2025-10-14Merge branch 'ja/asciidoc-doctor-verbatim-fixes' into maint-2.51Junio C Hamano1-2/+2
Doc mark-up fix. * ja/asciidoc-doctor-verbatim-fixes: doc: fix asciidoc format compatibility in pretty-formats.adoc
2025-10-14Merge branch 'js/progress-delay-fix' into maint-2.51Junio C Hamano1-1/+1
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-14Merge branch 'ds/doc-ggg-pr-fork-clarify' into maint-2.51Junio C Hamano1-4/+7
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-14Merge branch 'js/doc-gitk-history' into maint-2.51Junio C Hamano1-4/+4
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-14Merge branch 'bc/doc-compat-object-format-not-working' into maint-2.51Junio C Hamano1-0/+4
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-14The nineteenth batchJunio C Hamano1-0/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-14Merge branch 'jc/optional-path'Junio C Hamano2-1/+17
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-14Merge branch 'je/doc-push-upstream'Junio C Hamano2-20/+68
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-14Merge branch 'kh/doc-patch-id-markup-fix'Junio C Hamano1-20/+23
Documentation mark-up fix. * kh/doc-patch-id-markup-fix: doc: patch-id: fix accidental literal blocks
2025-10-14Merge branch 'jn/doc-help-translaing-pretty-options'Junio C Hamano1-5/+6
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-14Merge branch 'jn/doc-synopsis'Junio C Hamano6-253/+280
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-13The eighteenth batchJunio C Hamano1-0/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-13Merge branch 'kn/reftable-consistency-checks'Junio C Hamano1-3/+3
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-13Merge branch 'ja/doc-markup-attached-paragraph-fix'Junio C Hamano2-15/+17
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-13doc: patch-id: convert to the modern synopsis styleKristoffer Haugsbakk1-11/+11
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-13fast-import: add '--signed-tags=<mode>' optionChristian Couder1-0/+5
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-13doc: git-tag: stop focusing on GPG signed tagsChristian Couder1-15/+33
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-10The seventeenth batchJunio C Hamano1-0/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-10Merge branch 'en/doc-merge-tree-describe-merge-base'Junio C Hamano1-4/+10
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-10Merge branch 'rj/doc-missing-technical-docs'Junio C Hamano1-0/+8
Doc updates. * rj/doc-missing-technical-docs: doc: add some missing technical documents
2025-10-10doc: fix accidental literal blocksKristoffer Haugsbakk5-48/+64
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-09doc: explain the impact of stash.index on --autostash optionsD. Ben Knoble1-0/+4
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-09fsck: consider gpgsig headers expected in tagsbrian m. carlson1-0/+6
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-09rev-parse: allow printing compatibility hashbrian m. carlson1-5/+6
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-09docs: add documentation for loose objectsbrian m. carlson3-0/+55
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-09docs: improve ambiguous areas of pack format documentationbrian m. carlson1-0/+19
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-09docs: reflect actual double signature for tagsbrian m. carlson1-11/+13
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-09docs: update offset order for pack index v3brian m. carlson1-6/+4
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-09docs: update pack index v3 formatbrian m. carlson1-4/+8
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-09Merge branch 'kh/doc-patch-id-markup-fix' into kh/doc-patch-id-1Junio C Hamano1-20/+23
* kh/doc-patch-id-markup-fix: doc: patch-id: fix accidental literal blocks
2025-10-08The sixteenth batchJunio C Hamano1-0/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-08Merge branch 'ps/rust-balloon'Junio C Hamano1-0/+45
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-08Merge branch 'mh/doc-credential-url-prefix'Junio C Hamano1-8/+7
Doc update to describe a feature that has already been implemented. * mh/doc-credential-url-prefix: docs/gitcredentials: describe URL prefix matching
2025-10-07SubmittingPatches: guidance for multi-series effortsTaylor Blau1-0/+8
Occasionally there are efforts to contribute to the Git project that span more than one patch series in order to achieve a broader goal. By convention, the maintainer has typically suffixed the topic names with "-part-one", or "-part-1" and so on. Document that convention and suggest some guidance on how to structure proposed topic names for multi-series efforts. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07SubmittingPatches: extend release-notes experiment to topic namesTaylor Blau1-8/+13
In d255105c99 (SubmittingPatches: release-notes entry experiment, 2024-03-25), we began an experiment to have contributors suggest a topic description to appear in our RelNotes and "What's cooking?" reports. Extend that experiment to also welcome suggested topic branch names in addition to descriptions. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07The fifteenth batchJunio C Hamano1-0/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07Merge branch 'je/doc-push'Junio C Hamano1-96/+103
Doc updates. * je/doc-push: doc: git-push: rewrite refspec specification doc: git-push: create PUSH RULES section
2025-10-07parseopt: values of pathname type can be prefixed with :(optional)Junio C Hamano1-0/+14
In the previous step, we introduced an optional filename that can be given to a configuration variable, and nullify the fact that such a configuration setting even existed if the named path is missing or empty. Let's do the same for command line options that name a pathname. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07config: values of pathname type can be prefixed with :(optional)Junio C Hamano1-1/+3
Sometimes people want to specify additional configuration data as "best effort" basis. Maybe commit.template configuration file points at somewhere in ~/template/ but on a particular system, the file may not exist and the user may be OK without using the template in such a case. When the value given to a configuration variable whose type is pathname wants to signal such an optional file, it can be marked by prepending ":(optional)" in front of it. Such a setting that is marked optional would avoid getting the command barf for a missing file, as an optional configuration setting that names a missing file is not even seen. cf. <xmqq5ywehb69.fsf@gitster.g> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07refs/reftable: add fsck check for checking the table nameKarthik Nayak1-0/+3
Add glue code in 'refs/reftable-backend.c' which calls the reftable library to perform the fsck checks. Here we also map the reftable errors to Git' fsck errors. Introduce a check to validate table names for a given reftable stack. Also add 'badReftableTableName' as a corresponding error within Git. The reftable specification mentions: It suggested to use ${min_update_index}-${max_update_index}-${random}.ref as a naming convention. So treat non-conformant file names as warnings. While adding the fsck header to 'refs/reftable-backend.c', modify the list to maintain lexicographical ordering. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07Documentation/fsck-msgids: remove duplicate msg idKarthik Nayak1-3/+0
The `gitmodulesLarge` is repeated twice. Remove the second duplicate. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-07doc: fix indentation of refStorage item in git-config(1)Jeff King1-1/+2
Commit 5a12fd2a8c (doc: change the markup of paragraphs following a nested list item, 2025-09-27) converted the list of items in config/extensions.adoc into a definition list. This caused a small regression in the indentation of one item, but only when built with AsciiDoctor. You can see the problem with: $ ./doc-diff --asciidoctor 5a12fd2a8c^ 5a12fd2a8c --- a/c44beea485f0f2feaf460e2ac87fdd5608d63cf0-asciidoctor/home/peff/share/man/man1/git-config.1 +++ b/5a12fd2a8c850df311aa149c9bad87b7cb002abb-asciidoctor/home/peff/share/man/man1/git-config.1 @@ -3128,9 +3128,9 @@ CONFIGURATION FILE • reftable for the reftable format. This format is experimental and its internals are subject to change. - Note that this setting should only be set by git-init(1) or git- - clone(1). Trying to change it after initialization will not work - and will produce hard-to-diagnose issues. + Note that this setting should only be set by git-init(1) or git- + clone(1). Trying to change it after initialization will not work and + will produce hard-to-diagnose issues. relativeWorktrees If enabled, indicates at least one worktree has been linked with (along with many other changes which are correctly fixing what 5a12fd2a8c intended to fix). The "Note" paragraph should remain aligned with the bullet points, as they are left-aligned with the rest of the definition text. The confusion comes from a paragraph following a list item (ironically, the same case that 5a12fd2a8c was solving!). We can solve it by adding "--" block markers around the nested list. We couldn't have done that before 5a12fd2a8c because before then our list was nested inside another set of block markers, something that AsciiDoctor has trouble with. But now that we are a top-level definition list, it is OK to do so (and in fact, you can see that commit already made a similar adjustment for the worktreeConfig entry). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06doc: git-push: add explanation of `git push origin main`Julia Evans1-0/+4
What happens if you run `git push` without any arguments is actually extremely complex to explain, as discussed in the previous commit. But it's very easy to explain what `git push <remote> <branch>` does, so start the man page by explaining what that does. The hope is that someone could just stop reading the man page here and never learn anything else about `git push`, and that would be fine. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06doc: git-push: clarify "what to push"Julia Evans1-12/+15
From user feedback: 6 users says they found the "what to push" paragraphs confusing, for many different reasons, including: * what does "..." in <refspec>... mean? * "consult XXX configuration" is hard to parse * it refers to the `git-config` man page even though the config information for `git push` is included in this man page under CONFIGURATION * the default ("push to a branch with the same name") is what they use 99% of the time, they would have expected it to appear earlier instead of at the very end * not understanding what the term "upstream" means in Git ("are branches tracked by some system besides their names?"") Also, the current explanation of `push.default=simple` ("the current branch is pushed to the corresponding upstream branch, but as a safety measure, the push is aborted if the upstream branch does not have the same name as the local one.") is not accurate: `push.default=simple` does not always require you to set a corresponding upstream branch. Address all of these by * using a numbered "in order of precedence" list * giving a more accurate explanation of how `push.default=simple` works * giving a little bit of context around "upstream branch": it's something that you may have to set explicitly * referring to the new UPSTREAM BRANCHES section The default behaviour is still discussed pretty late but it should be easier to skim now to get to the relevant information. In "`git push` may fail if...", I'm intentionally being vague about what exactly `git push` does, because (as discussed on the mailing list) the behaviour of `push.default=simple` is very confusing, perhaps broken, and certainly not worth trying to explain in an introductory context. `push.default.simple` sometimes requires you to set an upstream and sometimes doesn't and the exact conditions under which it does/doesn't are hard to describe. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06doc: git-push: clarify "where to push"Julia Evans1-4/+2
It's not obvious that "`branch.*.remote` configuration"` refers to the upstream, so say "upstream" instead. The sentence is also quite hard to parse right now, use "defaults to" to simplify it. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06doc: add an UPSTREAM BRANCHES section to pull/push/fetchJulia Evans1-0/+42
From user feedback: one user mentioned that they don't know what the term "upstream branch" means. As far as I can tell, the most complete description is under the `--track` option in `git branch`. Upstreams are an important concept in Git and the `git branch` man page is not an obvious place for that information to live. There's also a very terse description of "upstream branch" in the glossary that's missing a lot of key information, like the fact that the upstream is used by `git status` and `git pull`, as well as a description in `git-config` in `branch.<name>.remote` which doesn't explain the relationship to `git status` either. Since the `git pull`, `git push`, and `git fetch` man pages already include sections on REMOTES and the syntax for URLs, add a section on UPSTREAM BRANCHES to `urls-remotes.adoc`. In the new UPSTREAM BRANCHES section, cover the various ways that upstreams branches are automatically set in Git, since users may mistakenly think that their branch does not have an upstream branch if they didn't explicitly set one. A terminology note: Git uses two terms for this concept: - "tracking" as in "the tracking information for the 'foo' branch" or the `--track` option to `git branch` - "upstream" or "upstream branch", as in `git push --set-upstream`. This term is also used in the `git rebase` man page to refer to the first argument to `git rebase`, as well as in `git pull` to refer to the branch which is going to be merged into the current branch ("merge the upstream branch into the current branch") Use "upstream branch" as a heading for this concept even though the term "upstream branch" is not always used strictly in the sense of "the tracking information for the current branch". "Upstream" is used much more often than "tracking" in the Git docs to refer to this concept and the goal is to help users understand the docs. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06doc: git-push: clarify introJulia Evans1-6/+7
From user feedback, 5 users are unsure what "ref" and/or "objects" means in this context. 3 users said they don't know what "complete the refs" means. Many users also commented that receive hooks do not seem like the most important thing to know about `git push`, and that this information should not be the second sentence in the man page. Use more familiar language to make it more accessible to users who do not know what a "ref" is and move the "hooks" comment to the end. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06add-patch: let options k and K roll over like j and JRené Scharfe1-2/+2
Options j and J roll over at the bottom and go to the first undecided hunk and hunk 1, respectively. Let options k and K do the same when they reach the top of the hunk array, so let them go to the last undecided hunk and the last hunk, respectively, for consistency. Also use the same direction-neutral error messages. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06add-patch: let options y, n, j, and e roll over to next undecidedRené Scharfe1-1/+1
The options y, n, and e mark the current hunk as decided. If there's another undecided hunk towards the bottom of the hunk array they go there. If there isn't, but there is another undecided hunk towards the top then they go to the very first hunk, no matter if it has already been decided on. The option j does basically the same move. Technically it is not allowed if there's no undecided hunk towards the bottom, but the variable "permitted" is never reset, so this permission is retained from the very first hunk. That may a bug, but this behavior is at least consistent with y, n, and e and arguably more useful than refusing to move. Improve the roll-over behavior of these four options by moving to the first undecided hunk instead of hunk 1, consistent with what they do when not rolling over. Also adjust the error message for j, as it will only be shown if there's no other undecided hunk in either direction. Reported-by: Windl, Ulrich <u.windl@ukr.de> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-06add-patch: document that option J rolls overRené Scharfe1-1/+1
The variable "permitted" is not reset after moving to a different hunk, so it only accumulates permission and doesn't necessarily reflect those of the current hunk. This may be a bug, but is actually useful with the option J, which can be used at the last hunk to roll over to the first hunk. Make this particular behavior official. Also adjust the error message, as it will only be shown if there's just a single hunk. Suggested-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>
2025-10-06add-patch: improve help for options j, J, k, and KRené Scharfe1-4/+4
The options j, J, k, and K don't affect the status of the current hunk. They just go to a different one. This is true whether the current hunk is undecided or not. Avoid misunderstanding by no longer mentioning the current hunk explicitly in their help texts. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-05doc: do not break sentences into "lego" piecesJean-Noël Avila1-5/+6
The sentence needs to be whole to be properly translated. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-05doc: convert git worktree to synopsis styleJean-Noël Avila2-84/+91
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Also add the config section in the manual page and do not refer to the man page in the description of settings when this description is already in the man page. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-05doc: convert git tag to synopsis styleJean-Noël Avila2-91/+104
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Also add the config section in the manual page and do not refer to the man page in the description of settings when this description is already in the man page. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-05doc: convert git-stash.adoc to synopis styleJean-Noël Avila2-78/+85
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Also do not refer to the man page in the description of settings when this description is already in the man page. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-03Documentation/git-merge-tree.adoc: clarify the --merge-base optionElijah Newren1-4/+10
The --merge-base option for merge-tree has a few slightly awkward constructions or omissions: * Split the initial long sentence describing the option into two, making the instructions and the limitations clearer for readers. * Add context to the final sentence that might be obvious to some readers but isn't immediately obvious to all. * The discussion about lack of support for multiple merge bases simply leave folks wondering why that matters and could help or hurt. Separate it out and add a brief explanation. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-03doc: add some missing technical documentsRamsay Jones1-0/+8
Commit bcf7edee09 ("meson: generate articles", 2024-12-27) added the generation of the 'howto' and 'technical' documents to the meson build. At this time those documents had a '*.txt' file extension, but they were renamed with an '*.adoc' extension by commit 1f010d6bdf ("doc: use .adoc extension for AsciiDoc files", 2025-01-20), for the most part. For the meson build, commit 87eccc3a81 ("meson: fix building technical and howto docs", 2025-03-02) fixed the meson.build files, which had not been updated when the files were renamed. However, the 'Documentation/Makefile' has not been updated to include all of the recently added technical documents. In particular, the following are built by meson, but not by the Makefile: commit-graph.adoc directory-rename-detection.adoc packfile-uri.adoc remembering-renames.adoc repository-version.adoc rerere.adoc sparse-checkout.adoc sparse-index.adoc In order to ensure that both build systems format the same technical documents, add the above documents to the TECH_DOCS variable in the Documentation/Makefile. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-02The fourteenth batchJunio C Hamano1-0/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-02Merge branch 'kh/you-still-use-whatchanged-fix'Junio C Hamano4-5/+11
The "do you still use it?" message given by a command that is deeply deprecated and allow us to suggest alternatives has been updated. * kh/you-still-use-whatchanged-fix: BreakingChanges: remove claim about whatchanged reports whatchanged: remove not-even-shorter clause whatchanged: hint about git-log(1) and aliasing you-still-use-that??: help the user help themselves t0014: test shadowing of aliases for a sample of builtins git: allow alias-shadowing deprecated builtins git: move seen-alias bookkeeping into handle_alias(...) git: add `deprecated` category to --list-cmds Makefile: don’t add whatchanged after it has been removed
2025-10-02Merge branch 'ps/meson-build-docs'Junio C Hamano3-8/+8
The build procedure based on meson learned a target to only build documentation, similar to "make doc". * ps/meson-build-docs: ci: don't compile whole project when testing docs with Meson meson: print docs backend as part of the summary meson: introduce a "docs" alias to compile documentation only
2025-10-02Merge branch 'cc/fast-import-strip-signed-commits'Junio C Hamano1-0/+5
"git fast-import" learned that "--signed-commits=<how>" option that corresponds to that of "git fast-export". * cc/fast-import-strip-signed-commits: fast-import: add '--signed-commits=<mode>' option gpg-interface: refactor 'enum sign_mode' parsing
2025-10-02Merge branch 'ms/refs-optimize'Junio C Hamano3-52/+63
"git refs optimize" is added for not very well explained reason despite it does the same thing as "git pack-refs"... * ms/refs-optimize: t: add test for git refs optimize subcommand t0601: refactor tests to be shareable builtin/refs: add optimize subcommand doc: pack-refs: factor out common options builtin/pack-refs: factor out core logic into a shared library builtin/pack-refs: convert to use the generic refs_optimize() API reftable-backend: implement 'optimize' action files-backend: implement 'optimize' action refs: add a generic 'optimize' API
2025-10-02BreakingChanges: announce Rust becoming mandatoryPatrick Steinhardt1-0/+45
Over the last couple of years the appetite for bringing Rust into the codebase has grown significantly across the developer base. Introducing Rust is a major change though and has ramifications for the whole ecosystem: - Some platforms have a Rust toolchain available, but have not yet integrated it into their build infrastructure. - Some platforms don't have any support for Rust at all. - Some platforms may have to figure out how to fit Rust into their bootstrapping sequence. Due to this, and given that Git is a critical piece of infrastructure for the whole industry, we cannot just introduce such a heavyweight dependency without doing our due diligence. Instead, preceding commits have introduced a test balloon into our build infrastructure that convert one tiny subsystem to use Rust. For now, using Rust to build that subsystem is entirely optional -- if no Rust support is available, we continue to use the C implementation. This test balloon has the intention to give distributions time and let them ease into our adoption of Rust. Having multiple implementations of the same subsystem is not sustainable though, and the plan is to eventually be able to use Rust freely all across our codebase. As such, there is the intent to make Rust become a mandatory part of our build process. Add an announcement to our breaking changes that Rust will become mandatory in Git 3.0. A (very careful and non-binding) estimate might be that this major release might be released in the second half of next year, which should give distributors enough time to prepare for the change. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-01SubmittingPatches: add section about AIChristian Couder1-0/+28
As more and more developer tools use AI, we are facing two main risks related to AI generated content: - its situation regarding copyright and license is not clear, and: - more and more bad quality content could be submitted for review to the mailing list. To mitigate both risks, let's add an "Use of Artificial Intelligence" section to "Documentation/SubmittingPatches" with the goal of discouraging its blind use to generate content that is submitted to the project, while still allowing us to benefit from its help in some innovative, useful and less risky ways. Helped-by: Rick Sanders <rick@sfconservancy.org> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-01docs/gitcredentials: describe URL prefix matchingM Hickford1-8/+7
Documentation was inaccurate since 9a121b0d226 (credential: handle `credential.<partial-URL>.<key>` again, 2020-04-24) Add tests for documented behaviour. Signed-off-by: M Hickford <mirth.hickford@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-29doc: patch-id: fix accidental literal blocksKristoffer Haugsbakk1-20/+23
All the final paragraphs on these three options are rendered as literal blocks. The intent was surely to keep each of them wed to their respective description list items. But the attempt at maintaining the indentation level of the block causes each them to be interpreted as a code block, since code blocks can be represented using indentation. We need to use list continuation (+) in order to keep them wed to their blocks. There is also an unordered list which sandwiches two paragraphs on an option. We don’t need to do anything about that since it attaches to the description list item without list continuation (i.e. it is already correct). But for consistency let’s use list continuation and an open block on it. Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-29The thirteenth batcnJunio C Hamano1-0/+42
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-29Merge branch 'dk/stash-apply-index'Junio C Hamano1-0/+5
The stash.index configuration variable can be set to make "git stash pop/apply" pretend that it was invoked with "--index". * dk/stash-apply-index: stash: honor stash.index in apply, pop modes stash: refactor private config globals t3905: remove unneeded blank line t3903: reduce dependencies on previous tests
2025-09-29Merge branch 'je/doc-checkout'Junio C Hamano1-75/+76
Doc updates. * je/doc-checkout: doc: git-checkout: clarify restoring files section doc: git-checkout: split up restoring files section doc: git-checkout: deduplicate --detach explanation doc: git-checkout: clarify `-b` and `-B` doc: git-checkout: clarify `git checkout <branch>` doc: git-checkout: clarify ARGUMENT DISAMBIGUATION doc: git-checkout: clarify intro sentence
2025-09-29Merge branch 'pw/3.0-default-initial-branch-to-main'Junio C Hamano2-3/+15
Declare that "git init" that is not otherwise configured uses 'main' as the initial branch, not 'master', starting Git 3.0. * pw/3.0-default-initial-branch-to-main: t0613: stop setting default initial branch t9902: switch default branch name to main t4013: switch default branch name to main breaking-changes: switch default branch to main
2025-09-27doc: change the markup of paragraphs following a nested list itemJean-Noël Avila2-14/+15
Asciidoctor and asciidoc.py have different behaviors when a paragraph follows a nested list item. Asciidoctor has a bug[1] that makes it keep a plus sign (+) used to attached paragraphs at the beginning of the paragraph. This commit uses workarounds to avoid this problem by using second level definition lists and open blocks. [1]:https://github.com/asciidoctor/asciidoctor/issues/4704 Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-24doc: git-push: rewrite refspec specificationJulia Evans1-47/+58
From user feedback, there was a request for examples, as well as a comment that one person found "If git push [<repository>] without any <refspec> argument is set to update some ref at the destination with <src> with remote.<repository>.push configuration variable..." impossible to understand. To make the section easier to navigate, create a list of every possible refspec form, with examples for each form as well as 2 forms which were previously missing (patterns and negative refspecs). Made a few changes to use more familiar language, but ultimately refspecs are a pretty advanced feature so I've mostly left the terminology alone. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-24doc: git-push: create PUSH RULES sectionJulia Evans1-49/+45
Right now the rules for when a `git push` is allowed are buried at the bottom of the description of `<refspec>`. Put them in their own section so that we can reference them from `--force` and give some context for why they exist. Having the "PUSH RULES" section also lets us be a little bit more specific with the rule in `--force`: we can just focus on the rule for pushing for a branch (which is likely the one that's most relevant) and leave the details about what happens when you push to a tag or a ref that isn't a branch to the later section. Signed-off-by: Julia Evans <julia@jvns.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-23The twelfth batchJunio C Hamano1-0/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-23Merge branch 'cc/promisor-remote-capability'Junio C Hamano2-16/+109
The "promisor-remote" capability mechanism has been updated to allow the "partialCloneFilter" settings and the "token" value to be communicated from the server side. * cc/promisor-remote-capability: promisor-remote: use string_list_split() in mark_remotes_as_accepted() promisor-remote: allow a client to check fields promisor-remote: use string_list_split() in filter_promisor_remote() promisor-remote: refactor how we parse advertised fields promisor-remote: use string constants for 'name' and 'url' too promisor-remote: allow a server to advertise more fields promisor-remote: refactor to get rid of 'struct strvec'
2025-09-21stash: honor stash.index in apply, pop modesD. Ben Knoble1-0/+5
With stash.index=true, git-stash(1) command now tries to reinstate the index by default in the "apply" and "pop" modes. Not doing so creates a common trap [1], [2]: "git stash apply" is not the reverse of "git stash push" because carefully staged indices are lost and have to be manually recreated. OTOH, this mode is not always desirable and may create more conflicts when applying stashes. As usual, "--no-index" will disable this behavior if you set "stash.index". [1]: https://lore.kernel.org/git/CAPx1GvcxyDDQmCssMjEnt6JoV6qPc5ZUpgPLX3mpUC_4PNYA1w@mail.gmail.com/ [2]: https://lore.kernel.org/git/c5a811ac-8cd3-c389-ac6d-29020a648c87@gmail.com/ Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-19builtin/refs: add optimize subcommandMeet Soni1-0/+10
As part of the ongoing effort to consolidate reference handling, introduce a new `optimize` subcommand. This command provides the same functionality and exit-code behavior as `git pack-refs`, serving as its modern replacement. Implement `cmd_refs_optimize` by having it call the `pack_refs_core()` helper function. This helper was factored out of the original `cmd_pack_refs` in a preceding commit, allowing both commands to share the same core logic as independent peers. Add documentation for the new command. The man page leverages the shared options file, created in a previous commit, by using the AsciiDoc `include::` macro to ensure consistency with git-pack-refs(1). Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: shejialuo <shejialuo@gmail.com> Signed-off-by: Meet Soni <meetsoni3017@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-19doc: pack-refs: factor out common optionsMeet Soni2-52/+53
In preparation for adding documentation for `git refs optimize`, factor out the common options from the `git-pack-refs` man page into a shareable file `pack-refs-options.adoc` and update `git-pack-refs.adoc` to use an `include::` macro. This change is a pure refactoring and results in no change to the final rendered documentation for `pack-refs`. Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: shejialuo <shejialuo@gmail.com> Signed-off-by: Meet Soni <meetsoni3017@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-18The tenth batchJunio C Hamano1-0/+31
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-18Merge branch 'ag/doc-sendmail-gmail-example-update'Junio C Hamano1-4/+4
Doc update. * ag/doc-sendmail-gmail-example-update: docs: update sendmail docs to use more secure SMTP server for Gmail
2025-09-18Merge branch 'kn/clang-format-bitfields'Junio C Hamano1-0/+6
CodingGuidelines now spells out how bitfields are to be written. * kn/clang-format-bitfields: Documentation: note styling for bit fields
2025-09-18Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix'Junio C Hamano1-5/+4
Doc mark-up fix. * jc/doc-includeif-hasconfig-remote-url-fix: config: document includeIf conditions consistently
2025-09-18Merge branch 'ag/send-email-imap-sent'Junio C Hamano2-0/+28
"git send-email" learned to drive "git imap-send" to store already sent e-mails in an IMAP folder. * ag/send-email-imap-sent: send-email: enable copying emails to an IMAP folder without actually sending them send-email: add ability to send a copy of sent emails to an IMAP folder
2025-09-18Merge branch 'pw/3.0-commentchar-auto-deprecation'Junio C Hamano2-2/+23
"core.commentChar=auto" that attempts to dynamically pick a suitable comment character is non-workable, as it is too much trouble to support for little benefit, and is marked as deprecated. * pw/3.0-commentchar-auto-deprecation: commit: print advice when core.commentString=auto config: warn on core.commentString=auto breaking-changes: deprecate support for core.commentString=auto