Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4511d56
you-still-use-that??: help deprecating commands for removal
gitster May 12, 2025
ba69a6c
doc: prepare for a world without whatchanged
gitster May 12, 2025
ab4d188
tests: prepare for a world without whatchanged
gitster May 12, 2025
731a2c7
whatchanged: require --i-still-use-this
gitster May 12, 2025
07572f2
whatchanged: remove when built with WITH_BREAKING_CHANGES
gitster May 12, 2025
e836757
whatschanged: list it in BreakingChanges document
gitster May 12, 2025
95b5039
builtin/gc: use designated field initializers for maintenance tasks
pks-t Jun 3, 2025
bd19b94
builtin/gc: drop redundant local variable
pks-t Jun 3, 2025
1bb6bdb
builtin/maintenance: centralize configuration of explicit tasks
pks-t Jun 3, 2025
a7c86d3
builtin/maintenance: mark "--task=" and "--schedule=" as incompatible
pks-t Jun 3, 2025
38a8fa5
builtin/maintenance: stop modifying global array of tasks
pks-t Jun 3, 2025
2aa9ee7
builtin/maintenance: extract function to run tasks
pks-t Jun 3, 2025
3236e03
builtin/maintenance: fix typedef for function pointers
pks-t Jun 3, 2025
5bb4298
builtin/maintenance: split into foreground and background tasks
pks-t Jun 3, 2025
c367852
builtin/maintenance: fix locking race with refs and reflogs tasks
pks-t Jun 3, 2025
697202b
usage: allow dying without writing an error message
pks-t Jun 3, 2025
d2b084c
builtin/gc: avoid global state in `gc_before_repack()`
pks-t Jun 3, 2025
1b5074e
builtin/maintenance: fix locking race when handling "gc" task
pks-t Jun 3, 2025
ff73f37
mailinfo.c: fix memory leak in function handle_content_type()
jinyaoguo Jun 13, 2025
d094e05
diff-no-index: do not reference .d_type member of struct dirent
gitster Jun 18, 2025
a5cc6a2
Merge branch 'jc/you-still-use-whatchanged'
gitster Jun 25, 2025
4c9a5d7
Merge branch 'ps/maintenance-ref-lock'
gitster Jun 25, 2025
567dc41
Merge branch 'jc/diff-no-index-with-pathspec-fix'
gitster Jun 25, 2025
d5ee0e2
Merge branch 'jg/mailinfo-leakfix'
gitster Jun 25, 2025
cf6f63e
The fourth batch
gitster Jun 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
8 changes: 8 additions & 0 deletions Documentation/BreakingChanges.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ These features will be removed.
timeframe, in preference to its synonym "--annotate-stdin". Git 3.0
removes the support for "--stdin" altogether.

* The git-whatchanged(1) command has outlived its usefulness more than
10 years ago, and takes more keystrokes to type than its rough
equivalent `git log --raw`. We have nominated the command for
removal, have changed the command to refuse to work unless the
`--i-still-use-this` option is given, and asked the users to report
when they do so. So far there hasn't been a single complaint.
+
The command will be removed.

== Superseded features that will not be deprecated

Expand Down
7 changes: 6 additions & 1 deletion Documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,12 @@ lint-docs-meson:
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
grep -v -e '#' -e '^$$' | \
sort >tmp-meson-diff/meson.adoc && \
ls git*.adoc scalar.adoc | grep -v -e git-bisect-lk2009.adoc -e git-pack-redundant.adoc -e git-tools.adoc >tmp-meson-diff/actual.adoc && \
ls git*.adoc scalar.adoc | \
grep -v -e git-bisect-lk2009.adoc \
-e git-pack-redundant.adoc \
-e git-tools.adoc \
-e git-whatchanged.adoc \
>tmp-meson-diff/actual.adoc && \
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
echo "Meson man pages differ from actual man pages:"; \
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \
Expand Down
4 changes: 2 additions & 2 deletions Documentation/MyFirstObjectWalk.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
}
----

Also add the relevant line in `builtin.h` near `cmd_whatchanged()`:
Also add the relevant line in `builtin.h` near `cmd_version()`:

----
int cmd_walken(int argc, const char **argv, const char *prefix, struct repository *repo);
----

Include the command in `git.c` in `commands[]` near the entry for `whatchanged`,
Include the command in `git.c` in `commands[]` near the entry for `version`,
maintaining alphabetical ordering:

----
Expand Down
10 changes: 10 additions & 0 deletions Documentation/RelNotes/2.51.0.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ UI, Workflows & Features

* "git subtree" (in contrib/) learned to grok GPG signing its commits.

* "git whatchanged" that is longer to type than "git log --raw"
which is its modern rough equivalent has outlived its usefulness
more than 10 years ago. Plan to deprecate and remove it.


Performance, Internal Implementation, Development Support etc.
--------------------------------------------------------------
Expand Down Expand Up @@ -69,6 +73,11 @@ Fixes since v2.50
correctly parsed and replaced, which has been corrected.
(merge abf94a283f sa/multi-mailmap-fix later to maint).

* "git maintenance" lacked the care "git gc" had to avoid holding
onto the repository lock for too long during packing refs, which
has been remedied.
(merge 1b5074e614 ps/maintenance-ref-lock later to maint).

* Other code cleanup, docfix, build fix, etc.
(merge b257adb571 lo/my-first-ow-doc-update later to maint).
(merge 8b34b6a220 ly/sequencer-update-squash-is-fixup-only later to maint).
Expand All @@ -82,3 +91,4 @@ Fixes since v2.50
(merge 1fde1c5daf ac/preload-index-wo-the-repository later to maint).
(merge 855cfc65ae rm/t2400-modernize later to maint).
(merge 2939494284 ly/run-builtin-use-passed-in-repo later to maint).
(merge ff73f375bb jg/mailinfo-leakfix later to maint).
6 changes: 6 additions & 0 deletions Documentation/config/format.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,15 @@ format.encodeEmailHeaders::
Defaults to true.

format.pretty::
ifndef::with-breaking-changes[]
The default pretty format for log/show/whatchanged command.
See linkgit:git-log[1], linkgit:git-show[1],
linkgit:git-whatchanged[1].
endif::with-breaking-changes[]
ifdef::with-breaking-changes[]
The default pretty format for log/show command.
See linkgit:git-log[1], linkgit:git-show[1].
endif::with-breaking-changes[]

format.thread::
The default threading style for 'git format-patch'. Can be
Expand Down
11 changes: 9 additions & 2 deletions Documentation/config/log.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
log.abbrevCommit::
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may
If true, makes
ifndef::with-breaking-changes[]
linkgit:git-log[1], linkgit:git-show[1], and
linkgit:git-whatchanged[1]
endif::with-breaking-changes[]
ifdef::with-breaking-changes[]
linkgit:git-log[1] and linkgit:git-show[1]
endif::with-breaking-changes[]
assume `--abbrev-commit`. You may
override this option with `--no-abbrev-commit`.

log.date::
Expand Down
10 changes: 8 additions & 2 deletions Documentation/git-whatchanged.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ git-whatchanged - Show logs with differences each commit introduces

SYNOPSIS
--------
[verse]
'git whatchanged' <option>...
[synopsis]
git whatchanged <option>...

WARNING
-------
`git whatchanged` has been deprecated and is scheduled for removal in
a future version of Git, as it is merely `git log` with different
default; `whatchanged` is not even shorter to type than `log --raw`.

DESCRIPTION
-----------
Expand Down
2 changes: 1 addition & 1 deletion Documentation/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ manpages = {
'git-verify-tag.adoc' : 1,
'git-version.adoc' : 1,
'git-web--browse.adoc' : 1,
'git-whatchanged.adoc' : 1,
'git-worktree.adoc' : 1,
'git-write-tree.adoc' : 1,
'git.adoc' : 1,
Expand Down Expand Up @@ -207,6 +206,7 @@ manpages = {

manpages_breaking_changes = {
'git-pack-redundant.adoc' : 1,
'git-whatchanged.adoc' : 1,
}

if not get_option('breaking_changes')
Expand Down
5 changes: 5 additions & 0 deletions Documentation/pretty-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ ifndef::git-rev-list[]
--notes[=<ref>]::
Show the notes (see linkgit:git-notes[1]) that annotate the
commit, when showing the commit log message. This is the default
ifndef::with-breaking-changes[]
for `git log`, `git show` and `git whatchanged` commands when
endif::with-breaking-changes[]
ifdef::with-breaking-changes[]
for `git log` and `git show` commands when
endif::with-breaking-changes[]
there is no `--pretty`, `--format`, or `--oneline` option given
on the command line.
+
Expand Down
9 changes: 7 additions & 2 deletions Documentation/rev-list-options.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,13 @@ Commit Formatting

ifdef::git-rev-list[]
Using these options, linkgit:git-rev-list[1] will act similar to the
more specialized family of commit log tools: linkgit:git-log[1],
linkgit:git-show[1], and linkgit:git-whatchanged[1]
more specialized family of commit log tools:
ifndef::with-breaking-changes[]
linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].
endif::with-breaking-changes[]
ifdef::with-breaking-changes[]
linkgit:git-log[1] and linkgit:git-show[1].
endif::with-breaking-changes[]
endif::git-rev-list[]

include::pretty-options.adoc[]
Expand Down
2 changes: 1 addition & 1 deletion Documentation/technical/sparse-checkout.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ understanding these differences can be beneficial.
* blame (only matters when one or more -C flags are passed)
* and annotate
* log
* whatchanged
* whatchanged (may not exist anymore)
* ls-files
* diff-index
* diff-tree
Expand Down
2 changes: 1 addition & 1 deletion Documentation/user-manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4240,7 +4240,7 @@ command `git`. The source side of a builtin is
- an entry in `BUILTIN_OBJECTS` in the `Makefile`.

Sometimes, more than one builtin is contained in one source file. For
example, `cmd_whatchanged()` and `cmd_log()` both reside in `builtin/log.c`,
example, `cmd_show()` and `cmd_log()` both reside in `builtin/log.c`,
since they share quite a bit of code. In that case, the commands which are
_not_ named like the `.c` file in which they live have to be listed in
`BUILT_INS` in the `Makefile`.
Expand Down
4 changes: 2 additions & 2 deletions builtin/am.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,

if (!patch_format) {
fprintf_ln(stderr, _("Patch format detection failed."));
exit(128);
die(NULL);
}

if (mkdir(state->dir, 0777) < 0 && errno != EEXIST)
Expand Down Expand Up @@ -1178,7 +1178,7 @@ static void NORETURN die_user_resolve(const struct am_state *state)
strbuf_release(&sb);
}

exit(128);
die(NULL);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions builtin/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
init_tree_desc(&trees[0], &tree->object.oid,
tree->buffer, tree->size);
if (parse_tree(new_tree) < 0)
exit(128);
die(NULL);
tree = new_tree;
init_tree_desc(&trees[1], &tree->object.oid,
tree->buffer, tree->size);
Expand Down Expand Up @@ -913,7 +913,7 @@ static int merge_working_tree(const struct checkout_opts *opts,
work,
old_tree);
if (ret < 0)
exit(128);
die(NULL);
ret = reset_tree(new_tree,
opts, 0,
writeout_error, new_branch_info);
Expand Down
2 changes: 1 addition & 1 deletion builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ static int update_local_ref(struct ref *ref,
fast_forward = repo_in_merge_bases(the_repository, current,
updated);
if (fast_forward < 0)
exit(128);
die(NULL);
forced_updates_ms += (getnanotime() - t_before) / 1000000;
} else {
fast_forward = 1;
Expand Down
Loading