Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
4f9c8d8
string-list: report programming error with BUG
gitster Aug 1, 2025
9f6dfe4
string-list: align string_list_split() with its _in_place() counterpart
gitster Aug 1, 2025
527535f
string-list: unify string_list_split* functions
gitster Aug 1, 2025
5764549
string-list: optionally trim string pieces split by string_list_split*()
gitster Aug 1, 2025
f3a303a
diff: simplify parsing of diff.colormovedws
gitster Aug 1, 2025
27531ef
string-list: optionally omit empty string pieces in string_list_split*()
gitster Aug 1, 2025
2ab2aac
string-list: split-then-remove-empty can be done while splitting
gitster Aug 1, 2025
5e901d1
Merge branch 'jc/string-list-split' into jc/strbuf-split
gitster Aug 3, 2025
2efe707
wt-status: avoid strbuf_split*()
gitster Jul 31, 2025
899ff9c
clean: do not pass strbuf by value
gitster Jul 31, 2025
7a4acc3
clean: do not use strbuf_split*() [part 1]
gitster Jul 31, 2025
4985f72
clean: do not pass the whole structure when it is not necessary
gitster Aug 3, 2025
4f60672
clean: do not use strbuf_split*() [part 2]
gitster Jul 31, 2025
d330912
merge-tree: do not use strbuf_split*()
gitster Jul 31, 2025
566e910
notes: do not use strbuf_split*()
gitster Jul 31, 2025
dcecac2
config: do not use strbuf_split()
gitster Jul 31, 2025
b894d44
environment: do not use strbuf_split*()
gitster Jul 31, 2025
d6fd08b
sub-process: do not use strbuf_split*()
gitster Jul 31, 2025
cb8e82a
trace2: trim_trailing_newline followed by trim is a no-op
gitster Jul 31, 2025
838fe56
trace2: do not use strbuf_split*()
gitster Jul 31, 2025
66e2adb
describe: use prio_queue
rscharfe Aug 3, 2025
08bb69d
describe: use prio_queue_replace()
rscharfe Aug 3, 2025
e9493c5
Documentation/git-reflog: convert to use synopsis type
pks-t Aug 6, 2025
649c7bb
builtin/reflog: improve grouping of subcommands
pks-t Aug 6, 2025
1ffd2d4
refs: export `ref_transaction_update_reflog()`
pks-t Aug 6, 2025
7aa619c
builtin/reflog: implement subcommand to write new entries
pks-t Aug 6, 2025
9fdbba8
ident: fix type of string length parameter
pks-t Aug 6, 2025
ec922e0
refs: fix identity for migrated reflogs
pks-t Aug 6, 2025
211fa8b
refs/files: detect race when generating reflog entry for HEAD
pks-t Aug 6, 2025
046c673
refs: stop unsetting REF_HAVE_OLD for log-only updates
pks-t Aug 6, 2025
465eff8
refs: fix invalid old object IDs when migrating reflogs
pks-t Aug 6, 2025
4d491ad
rebase -i: permit 'drop' of a merge commit
j6t Aug 6, 2025
cf03815
Merge branch 'ps/reflog-migrate-fixes' into ps/remote-rename-fix
gitster Aug 6, 2025
b9fd73a
refs: pass refname when invoking reflog entry callback
pks-t Jul 31, 2025
2f530e5
refs: simplify logic when migrating reflog entries
pks-t Jul 31, 2025
376d7f1
builtin/remote: fix sign comparison warnings
pks-t Jul 31, 2025
08e6a7a
builtin/remote: determine whether refs need renaming early on
pks-t Jul 31, 2025
68d090a
builtin/remote: rework how remote refs get renamed
pks-t Jul 31, 2025
16c4fa2
builtin/remote: only iterate through refs that are to be renamed
pks-t Jul 31, 2025
c5a2c76
merge-ort: update comments to modern testfile location
newren Aug 6, 2025
edbe2ab
merge-ort: drop unnecessary temporary in check_for_directory_rename()
newren Aug 6, 2025
034b2fd
t6423: document two bugs with rename-to-self testcases
newren Aug 6, 2025
db5015a
t6423: fix missed staging of file in testcases 12i,12j,12k
newren Aug 6, 2025
d3de978
merge-ort: clarify the interning of strings in opt->priv->path
newren Aug 6, 2025
885ffe5
merge-ort: fix incorrect file handling
newren Aug 6, 2025
f6ecb60
merge-ort: fix directory rename on top of source of other rename/delete
newren Aug 6, 2025
39fc408
t/t1517: automate `git subcmd -h` tests outside a repository
Unique-Usman Aug 8, 2025
18aae63
t5200: move `update-server-info -h` test from t1517
Unique-Usman Aug 8, 2025
529a60a
t5304: move `prune -h` test from t1517
Unique-Usman Aug 8, 2025
31e5d03
t5516: remove surrounding empty lines in test bodies
Denton-L Aug 8, 2025
b33c590
remote.c: remove BUG in show_push_unqualified_ref_name_error()
Denton-L Aug 8, 2025
dfbfc22
remote.c: convert if-else ladder to switch
Denton-L Aug 8, 2025
823d537
doc: git-log: fix description list
LemmingAvalanche Aug 8, 2025
cf7efa4
t6137-*.sh: fix test failure on cygwin
ramsay-jones Aug 8, 2025
6d19246
bloom: enable bloom filter with wildcard pathspec in revision traversal
brandb97 Aug 11, 2025
1fe6955
Merge branch 'js/rebase-i-allow-drop-on-a-merge'
gitster Aug 21, 2025
c3c8b69
Merge branch 'ps/reflog-migrate-fixes'
gitster Aug 21, 2025
9a85fa8
Merge branch 'ps/remote-rename-fix'
gitster Aug 21, 2025
5a404a7
Merge branch 'rs/describe-with-prio-queue'
gitster Aug 21, 2025
971ba42
Merge branch 'jc/string-list-split'
gitster Aug 21, 2025
54fef16
Merge branch 'jc/strbuf-split'
gitster Aug 21, 2025
3636c3a
Merge branch 'dl/push-missing-object-error'
gitster Aug 21, 2025
a19f469
Merge branch 'kh/doc-git-log-markup-fix'
gitster Aug 21, 2025
9e99f0e
Merge branch 'rj/t6137-cygwin-fix'
gitster Aug 21, 2025
0cdf09b
Merge branch 'ua/t1517-short-help-tests'
gitster Aug 21, 2025
d1123cd
Merge branch 'en/ort-rename-fixes'
gitster Aug 21, 2025
b4e38c1
Merge branch 'ly/changed-path-traversal-with-magic-pathspec'
gitster Aug 21, 2025
954d33a
Start 2.52 cycle, the first batch
gitster Aug 21, 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
58 changes: 58 additions & 0 deletions Documentation/RelNotes/2.52.0.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Git v2.52 Release Notes
=======================

UI, Workflows & Features
------------------------


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------

* string_list_split*() family of functions have been extended to
simplify common use cases.

* Arrays of strbuf is often a wrong data structure to use, and
strbuf_split*() family of functions that create them often have
better alternatives. Update several code paths and replace
strbuf_split*().

* Revision traversal limited with pathspec, like "git log dir/*",
used to ignore changed-paths Bloom filter when the pathspec
contained wildcards; now they take advantage of the filter when
they can.

Fixes since v2.51
-----------------

Unless otherwise noted, all the changes in 2.51.X maintenance track,
including security updates, are included in this release.

* During interactive rebase, using 'drop' on a merge commit lead to
an error, which was incorrect.
(merge 4d491ade8f js/rebase-i-allow-drop-on-a-merge later to maint).

* "git refs migrate" to migrate the reflog entries from a refs
backend to another had a handful of bugs squashed.
(merge 465eff81de ps/reflog-migrate-fixes later to maint).

* "git remote rename origin upstream" failed to move origin/HEAD to
upstream/HEAD when origin/HEAD is unborn and performed other
renames extremely inefficiently, which has been corrected.
(merge 16c4fa26b9 ps/remote-rename-fix later to maint).

* "git describe" has been optimized by using better data structure.
(merge 08bb69d70f rs/describe-with-prio-queue later to maint).

* "git push" had a code path that led to BUG() but it should have
been a die(), as it is a response to a usual but invalid end-user
action to attempt pushing an object that does not exist.
(merge dfbfc2221b dl/push-missing-object-error later to maint).

* Various bugs about rename handling in "ort" merge strategy have
been fixed.
(merge f6ecb603ff en/ort-rename-fixes later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge 823d537fa7 kh/doc-git-log-markup-fix later to maint).
(merge cf7efa4f33 rj/t6137-cygwin-fix later to maint).
(merge 529a60a885 ua/t1517-short-help-tests later to maint).
4 changes: 2 additions & 2 deletions Documentation/config/log.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ be used.
Print out the ref names of any commits that are shown by the log
command. Possible values are:
+
----
--
`short`;; the ref name prefixes `refs/heads/`, `refs/tags/` and
`refs/remotes/` are not printed.
`full`;; the full ref name (including prefix) are printed.
`auto`;; if the output is going to a terminal,
the ref names are shown as if `short` were given, otherwise no ref
names are shown.
----
--
+
This is the same as the `--decorate` option of the `git log`.

Expand Down
96 changes: 52 additions & 44 deletions Documentation/git-reflog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ git-reflog - Manage reflog information

SYNOPSIS
--------
[verse]
'git reflog' [show] [<log-options>] [<ref>]
'git reflog list'
'git reflog expire' [--expire=<time>] [--expire-unreachable=<time>]
[synopsis]
git reflog [show] [<log-options>] [<ref>]
git reflog list
git reflog exists <ref>
git reflog write <ref> <old-oid> <new-oid> <message>
git reflog delete [--rewrite] [--updateref]
[--dry-run | -n] [--verbose] <ref>@{<specifier>}...
git reflog drop [--all [--single-worktree] | <refs>...]
git reflog expire [--expire=<time>] [--expire-unreachable=<time>]
[--rewrite] [--updateref] [--stale-fix]
[--dry-run | -n] [--verbose] [--all [--single-worktree] | <refs>...]
'git reflog delete' [--rewrite] [--updateref]
[--dry-run | -n] [--verbose] <ref>@{<specifier>}...
'git reflog drop' [--all [--single-worktree] | <refs>...]
'git reflog exists' <ref>

DESCRIPTION
-----------
Expand All @@ -43,11 +44,15 @@ actions, and in addition the `HEAD` reflog records branch switching.

The "list" subcommand lists all refs which have a corresponding reflog.

The "expire" subcommand prunes older reflog entries. Entries older
than `expire` time, or entries older than `expire-unreachable` time
and not reachable from the current tip, are removed from the reflog.
This is typically not used directly by end users -- instead, see
linkgit:git-gc[1].
The "exists" subcommand checks whether a ref has a reflog. It exits
with zero status if the reflog exists, and non-zero status if it does
not.

The "write" subcommand writes a single entry to the reflog of a given
reference. This new entry is appended to the reflog and will thus become
the most recent entry. The reference name must be fully qualified. Both the old
and new object IDs must not be abbreviated and must point to existing objects.
The reflog message gets normalized.

The "delete" subcommand deletes single entries from the reflog, but
not the reflog itself. Its argument must be an _exact_ entry (e.g. "`git
Expand All @@ -58,9 +63,11 @@ The "drop" subcommand completely removes the reflog for the specified
references. This is in contrast to "expire" and "delete", both of which
can be used to delete reflog entries, but not the reflog itself.

The "exists" subcommand checks whether a ref has a reflog. It exits
with zero status if the reflog exists, and non-zero status if it does
not.
The "expire" subcommand prunes older reflog entries. Entries older
than `expire` time, or entries older than `expire-unreachable` time
and not reachable from the current tip, are removed from the reflog.
This is typically not used directly by end users -- instead, see
linkgit:git-gc[1].

OPTIONS
-------
Expand All @@ -71,26 +78,45 @@ Options for `show`
`git reflog show` accepts any of the options accepted by `git log`.


Options for `delete`
~~~~~~~~~~~~~~~~~~~~

`git reflog delete` accepts options `--updateref`, `--rewrite`, `-n`,
`--dry-run`, and `--verbose`, with the same meanings as when they are
used with `expire`.

Options for `drop`
~~~~~~~~~~~~~~~~~~

`--all`::
Drop the reflogs of all references from all worktrees.

`--single-worktree`::
By default when `--all` is specified, reflogs from all working
trees are dropped. This option limits the processing to reflogs
from the current working tree only.


Options for `expire`
~~~~~~~~~~~~~~~~~~~~

--all::
`--all`::
Process the reflogs of all references.

--single-worktree::
`--single-worktree`::
By default when `--all` is specified, reflogs from all working
trees are processed. This option limits the processing to reflogs
from the current working tree only.

--expire=<time>::
`--expire=<time>`::
Prune entries older than the specified time. If this option is
not specified, the expiration time is taken from the
configuration setting `gc.reflogExpire`, which in turn
defaults to 90 days. `--expire=all` prunes entries regardless
of their age; `--expire=never` turns off pruning of reachable
entries (but see `--expire-unreachable`).

--expire-unreachable=<time>::
`--expire-unreachable=<time>`::
Prune entries older than `<time>` that are not reachable from
the current tip of the branch. If this option is not
specified, the expiration time is taken from the configuration
Expand All @@ -100,17 +126,17 @@ Options for `expire`
turns off early pruning of unreachable entries (but see
`--expire`).

--updateref::
`--updateref`::
Update the reference to the value of the top reflog entry (i.e.
<ref>@\{0\}) if the previous top entry was pruned. (This
option is ignored for symbolic references.)

--rewrite::
`--rewrite`::
If a reflog entry's predecessor is pruned, adjust its "old"
SHA-1 to be equal to the "new" SHA-1 field of the entry that
now precedes it.

--stale-fix::
`--stale-fix`::
Prune any reflog entries that point to "broken commits". A
broken commit is a commit that is not reachable from any of
the reference tips and that refers, directly or indirectly, to
Expand All @@ -121,33 +147,15 @@ has the same cost as 'git prune'. It is primarily intended to fix
corruption caused by garbage collecting using older versions of Git,
which didn't protect objects referred to by reflogs.

-n::
--dry-run::
`-n`::
`--dry-run`::
Do not actually prune any entries; just show what would have
been pruned.

--verbose::
`--verbose`::
Print extra information on screen.


Options for `delete`
~~~~~~~~~~~~~~~~~~~~

`git reflog delete` accepts options `--updateref`, `--rewrite`, `-n`,
`--dry-run`, and `--verbose`, with the same meanings as when they are
used with `expire`.

Options for `drop`
~~~~~~~~~~~~~~~~~~

--all::
Drop the reflogs of all references from all worktrees.

--single-worktree::
By default when `--all` is specified, reflogs from all working
trees are dropped. This option limits the processing to reflogs
from the current working tree only.

GIT
---
Part of the linkgit:git[1] suite
2 changes: 1 addition & 1 deletion GIT-VERSION-GEN
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

DEF_VER=v2.51.0
DEF_VER=v2.51.GIT

LF='
'
Expand Down
2 changes: 1 addition & 1 deletion RelNotes
2 changes: 1 addition & 1 deletion builtin/blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ static void parse_color_fields(const char *s)
colorfield_nr = 0;

/* Ideally this would be stripped and split at the same time? */
string_list_split(&l, s, ',', -1);
string_list_split(&l, s, ",", -1);
ALLOC_GROW(colorfield, colorfield_nr + 1, colorfield_alloc);

for_each_string_list_item(item, &l) {
Expand Down
Loading