Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9bb4abe
combine-diff: zero memory used for callback filepairs
peff Aug 7, 2025
2a43e0e
within_depth: fix return for empty path
To1ne Aug 7, 2025
a1dfa54
diff: teach tree-diff a max-depth parameter
peff Aug 7, 2025
5119721
Merge branch 'ua/t1517-short-help-tests' into dk/help-all
gitster Aug 8, 2025
fe54b9e
parse-options: refactor flags for usage_with_options_internal
benknoble Aug 3, 2025
129b363
builtin: also setup gently for --help-all
benknoble Aug 3, 2025
f81a574
doc: test linkgit macros for well-formedness
jnavila Aug 11, 2025
63d33eb
doc: check well-formedness of delimited sections
jnavila Aug 11, 2025
ed26022
doc: check for absence of multiple terms in each entry of desc list
jnavila Aug 11, 2025
03a353b
doc: check for absence of the form --[no-]parameter
jnavila Aug 11, 2025
9320387
doc:git-for-each-ref: fix styling and typos
jnavila Aug 11, 2025
84f3d6e
doc lint: check that synopsis manpages have synopsis inlines
jnavila Aug 11, 2025
83d64df
t7005: use modern test style
benknoble Aug 13, 2025
a9c4141
t7005: stop abusing --exec-path
benknoble Aug 13, 2025
a60203a
t7005: sanitize test environment for subsequent tests
benknoble Aug 13, 2025
7d4a5fe
count-objects: document count-objects pack
DanieleSassoli Aug 14, 2025
3481cb7
commit-graph: stop using `the_hash_algo` via macros
pks-t Aug 15, 2025
e45402b
commit-graph: store the hash algorithm instead of its length
pks-t Aug 15, 2025
f1141b4
commit-graph: refactor `parse_commit_graph()` to take a repository
pks-t Aug 15, 2025
89cc9b9
commit-graph: stop using `the_hash_algo`
pks-t Aug 15, 2025
ddacfc7
commit-graph: stop using `the_repository`
pks-t Aug 15, 2025
7be9e41
commit-graph: stop passing in redundant repository
pks-t Aug 15, 2025
ab94bb8
repo: declare the repo command
lucasoshiro Aug 16, 2025
9adb8a7
repo: add the field references.format
lucasoshiro Aug 16, 2025
acf2669
repo: add the field layout.bare
lucasoshiro Aug 16, 2025
e52cd65
repo: add the field layout.shallow
lucasoshiro Aug 16, 2025
a81224d
repo: add the --format flag
lucasoshiro Aug 16, 2025
a3c6459
Merge branch 'dk/help-all'
gitster Aug 25, 2025
109c3df
Merge branch 'tc/diff-tree-max-depth'
gitster Aug 25, 2025
0d8f4cc
Merge branch 'ja/doc-lint-sections-and-synopsis'
gitster Aug 25, 2025
80d99d9
Merge branch 'dk/t7005-editor-updates'
gitster Aug 25, 2025
4f58f6d
Merge branch 'ds/doc-count-objects-fix'
gitster Aug 25, 2025
eed447d
Merge branch 'ps/commit-graph-wo-globals'
gitster Aug 25, 2025
ebb45da
Merge branch 'lo/repo-info'
gitster Aug 25, 2025
f814da6
The third batch
gitster Aug 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
/git-repack
/git-replace
/git-replay
/git-repo
/git-request-pull
/git-rerere
/git-reset
Expand Down
21 changes: 20 additions & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,26 @@ $(LINT_DOCS_FSCK_MSGIDS): ../fsck.h fsck-msgids.adoc
$(call mkdir_p_parent_template)
$(QUIET_GEN)$(PERL_PATH) lint-fsck-msgids.perl \
../fsck.h fsck-msgids.adoc $@

lint-docs-fsck-msgids: $(LINT_DOCS_FSCK_MSGIDS)

## Lint: delimited sections
LINT_DOCS_DELIMITED_SECTIONS = $(patsubst %.adoc,.build/lint-docs/delimited-sections/%.ok,$(MAN_TXT))
$(LINT_DOCS_DELIMITED_SECTIONS): lint-delimited-sections.perl
$(LINT_DOCS_DELIMITED_SECTIONS): .build/lint-docs/delimited-sections/%.ok: %.adoc
$(call mkdir_p_parent_template)
$(QUIET_LINT_DELIMSEC)$(PERL_PATH) lint-delimited-sections.perl $< >$@
.PHONY: lint-docs-delimited-sections
lint-docs-delimited-sections: $(LINT_DOCS_DELIMITED_SECTIONS)

## Lint: Documentation style
LINT_DOCS_DOC_STYLE = $(patsubst %.adoc,.build/lint-docs/doc-style/%.ok,$(DOC_DEP_TXT))
$(LINT_DOCS_DOC_STYLE): lint-documentation-style.perl
$(LINT_DOCS_DOC_STYLE): .build/lint-docs/doc-style/%.ok: %.adoc
$(call mkdir_p_parent_template)
$(QUIET_LINT_DOCSTYLE)$(PERL_PATH) lint-documentation-style.perl $< >$@
.PHONY: lint-docs-doc-style
lint-docs-doc-style: $(LINT_DOCS_DOC_STYLE)

lint-docs-manpages:
$(QUIET_GEN)./lint-manpages.sh

Expand Down Expand Up @@ -528,6 +545,8 @@ lint-docs: lint-docs-fsck-msgids
lint-docs: lint-docs-gitlink
lint-docs: lint-docs-man-end-blurb
lint-docs: lint-docs-man-section-order
lint-docs: lint-docs-delimited-sections
lint-docs: lint-docs-doc-style
lint-docs: lint-docs-manpages
lint-docs: lint-docs-meson

Expand Down
1 change: 1 addition & 0 deletions Documentation/RelNotes/1.6.2.4.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ exec >/var/tmp/1
echo O=$(git describe maint)
O=v1.6.2.3-38-g318b847
git shortlog --no-merges $O..maint
---
15 changes: 15 additions & 0 deletions Documentation/RelNotes/2.52.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ UI, Workflows & Features
* The "list" subcommand of "git refs" acts as a front-end for
"git for-each-ref".

* "git cmd --help-all" now works outside repositories.

* "git diff-tree" learned "--max-depth" option.

* A new subcommand "git repo" gives users a way to grab various
repository characteristics.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand All @@ -24,6 +31,12 @@ Performance, Internal Implementation, Development Support etc.
contained wildcards; now they take advantage of the filter when
they can.

* Doc lint updates to encourage the newer and easier-to-use
`synopsis` format, with fixes to a handful of existing uses.

* Remove dependency on the_repository and other globals from the
commit-graph code, and other changes unrelated to de-globaling.


Fixes since v2.51
-----------------
Expand Down Expand Up @@ -79,3 +92,5 @@ including security updates, are included in this release.
(merge 529a60a885 ua/t1517-short-help-tests later to maint).
(merge 22d421fed9 ac/deglobal-fmt-merge-log-config later to maint).
(merge 741f36c7d9 kr/clone-synopsis-fix later to maint).
(merge a60203a015 dk/t7005-editor-updates later to maint).
(merge 7d4a5fef7d ds/doc-count-objects-fix later to maint).
3 changes: 2 additions & 1 deletion Documentation/blame-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ include::line-range-format.adoc[]
iso format is used. For supported values, see the discussion
of the --date option at linkgit:git-log[1].

--[no-]progress::
--progress::
--no-progress::
Progress status is reported on the standard error stream
by default when it is attached to a terminal. This flag
enables progress reporting even if not attached to a
Expand Down
1 change: 1 addition & 0 deletions Documentation/diff-format.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ if the file was renamed on any side of history. With
followed by the name of the path in the merge commit.

Examples for `-c` and `--cc` without `--combined-all-paths`:

------------------------------------------------
::100644 100644 100644 fabadb8 cc95eb0 4866510 MM desc.c
::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM bar.sh
Expand Down
31 changes: 30 additions & 1 deletion Documentation/diff-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ endif::git-format-patch[]
Turn off rename detection, even when the configuration
file gives the default to do so.

`--[no-]rename-empty`::
`--rename-empty`::
`--no-rename-empty`::
Whether to use empty blobs as rename source.

ifndef::git-format-patch[]
Expand Down Expand Up @@ -893,5 +894,33 @@ endif::git-format-patch[]
reverted with `--ita-visible-in-index`. Both options are
experimental and could be removed in future.

--max-depth=<depth>::
For each pathspec given on command line, descend at most `<depth>`
levels of directories. A value of `-1` means no limit.
Cannot be combined with wildcards in the pathspec.
Given a tree containing `foo/bar/baz`, the following list shows the
matches generated by each set of options:
+
--
- `--max-depth=0 -- foo`: `foo`

- `--max-depth=1 -- foo`: `foo/bar`

- `--max-depth=1 -- foo/bar`: `foo/bar/baz`

- `--max-depth=1 -- foo foo/bar`: `foo/bar/baz`

- `--max-depth=2 -- foo`: `foo/bar/baz`
--
+
If no pathspec is given, the depth is measured as if all
top-level entries were specified. Note that this is different
than measuring from the root, in that `--max-depth=0` would
still return `foo`. This allows you to still limit depth while
asking for a subset of the top-level entries.
+
Note that this option is only supported for diffs between tree objects,
not against the index or working tree.

For more detailed explanation on these common options, see also
linkgit:gitdiffcore[7].
15 changes: 10 additions & 5 deletions Documentation/fetch-options.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--[no-]all::
--all::
--no-all::
Fetch all remotes, except for the ones that has the
`remote.<name>.skipFetchAll` configuration variable set.
This overrides the configuration variable fetch.all`.
Expand Down Expand Up @@ -88,7 +89,8 @@ This is incompatible with `--recurse-submodules=[yes|on-demand]` and takes
precedence over the `fetch.output` config option.

ifndef::git-pull[]
--[no-]write-fetch-head::
--write-fetch-head::
--no-write-fetch-head::
Write the list of remote refs fetched in the `FETCH_HEAD`
file directly under `$GIT_DIR`. This is the default.
Passing `--no-write-fetch-head` from the command line tells
Expand Down Expand Up @@ -118,13 +120,16 @@ ifndef::git-pull[]
Allow several <repository> and <group> arguments to be
specified. No <refspec>s may be specified.

--[no-]auto-maintenance::
--[no-]auto-gc::
--auto-maintenance::
--no-auto-maintenance::
--auto-gc::
--no-auto-gc::
Run `git maintenance run --auto` at the end to perform automatic
repository maintenance if needed. (`--[no-]auto-gc` is a synonym.)
This is enabled by default.

--[no-]write-commit-graph::
--write-commit-graph::
--no-write-commit-graph::
Write a commit-graph after fetching. This overrides the config
setting `fetch.writeCommitGraph`.
endif::git-pull[]
Expand Down
85 changes: 41 additions & 44 deletions Documentation/for-each-ref-options.adoc
Original file line number Diff line number Diff line change
@@ -1,84 +1,81 @@
<pattern>...::
If one or more patterns are given, only refs are shown that
match against at least one pattern, either using fnmatch(3) or
`<pattern>...`::
If one or more _<pattern>_ parameters are given, only refs are shown that
match against at least one pattern, either using `fnmatch`(3) or
literally, in the latter case matching completely or from the
beginning up to a slash.

--stdin::
If `--stdin` is supplied, then the list of patterns is read from
standard input instead of from the argument list.
`--stdin`::
The list of patterns is read from standard input instead of from
the argument list.

--count=<count>::
By default the command shows all refs that match
`<pattern>`. This option makes it stop after showing
that many refs.
`--count=<count>`::
Stop after showing _<count>_ refs.

--sort=<key>::
A field name to sort on. Prefix `-` to sort in
`--sort=<key>`::
Sort on the field name _<key>_. Prefix `-` to sort in
descending order of the value. When unspecified,
`refname` is used. You may use the --sort=<key> option
`refname` is used. You may use the `--sort=<key>` option
multiple times, in which case the last key becomes the primary
key.

--format=<format>::
`--format[=<format>]`::
A string that interpolates `%(fieldname)` from a ref being shown and
the object it points at. In addition, the string literal `%%`
renders as `%` and `%xx` - where `xx` are hex digits - renders as
the character with hex code `xx`. For example, `%00` interpolates to
`\0` (NUL), `%09` to `\t` (TAB), and `%0a` to `\n` (LF).
+
When unspecified, `<format>` defaults to `%(objectname) SPC %(objecttype)
`\0` (_NUL_), `%09` to `\t` (_TAB_), and `%0a` to `\n` (_LF_).

When unspecified, _<format>_ defaults to `%(objectname) SPC %(objecttype)
TAB %(refname)`.

--color[=<when>]::
`--color[=<when>]`::
Respect any colors specified in the `--format` option. The
`<when>` field must be one of `always`, `never`, or `auto` (if
_<when__ field must be one of `always`, `never`, or `auto` (if
`<when>` is absent, behave as if `always` was given).

--shell::
--perl::
--python::
--tcl::
`--shell`::
`--perl`::
`--python`::
`--tcl`::
If given, strings that substitute `%(fieldname)`
placeholders are quoted as string literals suitable for
the specified host language. This is meant to produce
a scriptlet that can directly be `eval`ed.
a scriptlet that can directly be "eval"ed.

--points-at=<object>::
`--points-at=<object>`::
Only list refs which points at the given object.

--merged[=<object>]::
`--merged[=<object>]`::
Only list refs whose tips are reachable from the
specified commit (HEAD if not specified).

--no-merged[=<object>]::
Only list refs whose tips are not reachable from the
specified commit (HEAD if not specified).
specified commit (`HEAD` if not specified).

--contains[=<object>]::
Only list refs which contain the specified commit (HEAD if not
`--no-merged[=<object>]`::
Only list refs whose tips are not reachable from _<object>_(`HEAD` if not
specified).

--no-contains[=<object>]::
Only list refs which don't contain the specified commit (HEAD
`--contains[=<object>]`::
Only list refs which contain _<object>_(`HEAD` if not specified).

`--no-contains[=<object>]`::
Only list refs which don't contain _<object>_ (`HEAD`
if not specified).

--ignore-case::
`--ignore-case`::
Sorting and filtering refs are case insensitive.

--omit-empty::
`--omit-empty`::
Do not print a newline after formatted refs where the format expands
to the empty string.

--exclude=<pattern>::
If one or more patterns are given, only refs which do not match
any excluded pattern(s) are shown. Matching is done using the
same rules as `<pattern>` above.
`--exclude=<excluded-pattern>`::
If one or more `--exclude` options are given, only refs which do not
match any _<excluded-pattern>_ parameters are shown. Matching is done
using the same rules as _<pattern>_ above.

--include-root-refs::
List root refs (HEAD and pseudorefs) apart from regular refs.
`--include-root-refs`::
List root refs (`HEAD` and pseudorefs) apart from regular refs.

--start-after=<marker>::
`--start-after=<marker>`::
Allows paginating the output by skipping references up to and including the
specified marker. When paging, it should be noted that references may be
deleted, modified or added between invocations. Output will only yield those
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git-am.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ OPTIONS
--keep-non-patch::
Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).

--[no-]keep-cr::
--keep-cr::
--no-keep-cr::
With `--keep-cr`, call 'git mailsplit' (see linkgit:git-mailsplit[1])
with the same option, to prevent it from stripping CR at the end of
lines. `am.keepcr` configuration variable can be used to specify the
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git-backfill.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ OPTIONS
blobs seen at a given path. The default minimum batch size is
50,000.

`--[no-]sparse`::
`--sparse`::
`--no-sparse`::
Only download objects if they appear at a path that matches the
current sparse-checkout. If the sparse-checkout feature is enabled,
then `--sparse` is assumed and can be disabled with `--no-sparse`.
Expand Down
6 changes: 4 additions & 2 deletions Documentation/git-cat-file.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ OPTIONS
or to ask for a "blob" with `<object>` being a tag object that
points at it.

--[no-]mailmap::
--[no-]use-mailmap::
--mailmap::
--no-mailmap::
--use-mailmap::
--no-use-mailmap::
Use mailmap file to map author, committer and tagger names
and email addresses to canonical real names and email addresses.
See linkgit:git-shortlog[1].
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git-check-attr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ For every pathname, this command will list if each attribute is 'unspecified',

OPTIONS
-------
-a, --all::
-a::
--all::
List all attributes that are associated with the specified
paths. If this option is used, then 'unspecified' attributes
will not be included in the output.
Expand Down
9 changes: 6 additions & 3 deletions Documentation/git-check-ignore.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ subject to exclude rules; but see `--no-index'.

OPTIONS
-------
-q, --quiet::
-q::
--quiet::
Don't output anything, just set exit status. This is only
valid with a single pathname.

-v, --verbose::
-v::
--verbose::
Instead of printing the paths that are excluded, for each path
that matches an exclude pattern, print the exclude pattern
together with the path. (Matching an exclude pattern usually
Expand All @@ -49,7 +51,8 @@ linkgit:gitignore[5].
below). If `--stdin` is also given, input paths are separated
with a NUL character instead of a linefeed character.

-n, --non-matching::
-n::
--non-matching::
Show given paths which don't match any pattern. This only
makes sense when `--verbose` is enabled, otherwise it would
not be possible to distinguish between paths which match a
Expand Down
3 changes: 2 additions & 1 deletion Documentation/git-check-ref-format.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ a branch.

OPTIONS
-------
--[no-]allow-onelevel::
--allow-onelevel::
--no-allow-onelevel::
Controls whether one-level refnames are accepted (i.e.,
refnames that do not contain multiple `/`-separated
components). The default is `--no-allow-onelevel`.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/git-checkout.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ include::diff-context-options.adoc[]
separated with _NUL_ character and all other characters are taken
literally (including newlines and quotes).

<branch>::
`<branch>`::
Branch to checkout; if it refers to a branch (i.e., a name that,
when prepended with "refs/heads/", is a valid ref), then that
branch is checked out. Otherwise, if it refers to a valid
Expand Down
Loading