Skip to content

Commit a5cc6a2

Browse files
committed
Merge branch 'jc/you-still-use-whatchanged'
"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. * jc/you-still-use-whatchanged: whatschanged: list it in BreakingChanges document whatchanged: remove when built with WITH_BREAKING_CHANGES whatchanged: require --i-still-use-this tests: prepare for a world without whatchanged doc: prepare for a world without whatchanged you-still-use-that??: help deprecating commands for removal
2 parents f0135a9 + e836757 commit a5cc6a2

21 files changed

+152
-39
lines changed

Documentation/BreakingChanges.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,14 @@ These features will be removed.
183183
timeframe, in preference to its synonym "--annotate-stdin". Git 3.0
184184
removes the support for "--stdin" altogether.
185185

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

187195
== Superseded features that will not be deprecated
188196

Documentation/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,12 @@ lint-docs-meson:
510510
awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \
511511
grep -v -e '#' -e '^$$' | \
512512
sort >tmp-meson-diff/meson.adoc && \
513-
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 && \
513+
ls git*.adoc scalar.adoc | \
514+
grep -v -e git-bisect-lk2009.adoc \
515+
-e git-pack-redundant.adoc \
516+
-e git-tools.adoc \
517+
-e git-whatchanged.adoc \
518+
>tmp-meson-diff/actual.adoc && \
514519
if ! cmp tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; then \
515520
echo "Meson man pages differ from actual man pages:"; \
516521
diff -u tmp-meson-diff/meson.adoc tmp-meson-diff/actual.adoc; \

Documentation/MyFirstObjectWalk.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ int cmd_walken(int argc, const char **argv, const char *prefix)
8383
}
8484
----
8585

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

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

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

9595
----

Documentation/config/format.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,15 @@ format.encodeEmailHeaders::
6868
Defaults to true.
6969

7070
format.pretty::
71+
ifndef::with-breaking-changes[]
7172
The default pretty format for log/show/whatchanged command.
7273
See linkgit:git-log[1], linkgit:git-show[1],
7374
linkgit:git-whatchanged[1].
75+
endif::with-breaking-changes[]
76+
ifdef::with-breaking-changes[]
77+
The default pretty format for log/show command.
78+
See linkgit:git-log[1], linkgit:git-show[1].
79+
endif::with-breaking-changes[]
7480

7581
format.thread::
7682
The default threading style for 'git format-patch'. Can be

Documentation/config/log.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
log.abbrevCommit::
2-
If true, makes linkgit:git-log[1], linkgit:git-show[1], and
3-
linkgit:git-whatchanged[1] assume `--abbrev-commit`. You may
2+
If true, makes
3+
ifndef::with-breaking-changes[]
4+
linkgit:git-log[1], linkgit:git-show[1], and
5+
linkgit:git-whatchanged[1]
6+
endif::with-breaking-changes[]
7+
ifdef::with-breaking-changes[]
8+
linkgit:git-log[1] and linkgit:git-show[1]
9+
endif::with-breaking-changes[]
10+
assume `--abbrev-commit`. You may
411
override this option with `--no-abbrev-commit`.
512

613
log.date::

Documentation/git-whatchanged.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ git-whatchanged - Show logs with differences each commit introduces
88

99
SYNOPSIS
1010
--------
11-
[verse]
12-
'git whatchanged' <option>...
11+
[synopsis]
12+
git whatchanged <option>...
13+
14+
WARNING
15+
-------
16+
`git whatchanged` has been deprecated and is scheduled for removal in
17+
a future version of Git, as it is merely `git log` with different
18+
default; `whatchanged` is not even shorter to type than `log --raw`.
1319

1420
DESCRIPTION
1521
-----------

Documentation/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ manpages = {
158158
'git-verify-tag.adoc' : 1,
159159
'git-version.adoc' : 1,
160160
'git-web--browse.adoc' : 1,
161-
'git-whatchanged.adoc' : 1,
162161
'git-worktree.adoc' : 1,
163162
'git-write-tree.adoc' : 1,
164163
'git.adoc' : 1,
@@ -207,6 +206,7 @@ manpages = {
207206

208207
manpages_breaking_changes = {
209208
'git-pack-redundant.adoc' : 1,
209+
'git-whatchanged.adoc' : 1,
210210
}
211211

212212
if not get_option('breaking_changes')

Documentation/pretty-options.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ ifndef::git-rev-list[]
6262
--notes[=<ref>]::
6363
Show the notes (see linkgit:git-notes[1]) that annotate the
6464
commit, when showing the commit log message. This is the default
65+
ifndef::with-breaking-changes[]
6566
for `git log`, `git show` and `git whatchanged` commands when
67+
endif::with-breaking-changes[]
68+
ifdef::with-breaking-changes[]
69+
for `git log` and `git show` commands when
70+
endif::with-breaking-changes[]
6671
there is no `--pretty`, `--format`, or `--oneline` option given
6772
on the command line.
6873
+

Documentation/rev-list-options.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,13 @@ Commit Formatting
11001100

11011101
ifdef::git-rev-list[]
11021102
Using these options, linkgit:git-rev-list[1] will act similar to the
1103-
more specialized family of commit log tools: linkgit:git-log[1],
1104-
linkgit:git-show[1], and linkgit:git-whatchanged[1]
1103+
more specialized family of commit log tools:
1104+
ifndef::with-breaking-changes[]
1105+
linkgit:git-log[1], linkgit:git-show[1], and linkgit:git-whatchanged[1].
1106+
endif::with-breaking-changes[]
1107+
ifdef::with-breaking-changes[]
1108+
linkgit:git-log[1] and linkgit:git-show[1].
1109+
endif::with-breaking-changes[]
11051110
endif::git-rev-list[]
11061111

11071112
include::pretty-options.adoc[]

Documentation/technical/sparse-checkout.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ understanding these differences can be beneficial.
440440
* blame (only matters when one or more -C flags are passed)
441441
* and annotate
442442
* log
443-
* whatchanged
443+
* whatchanged (may not exist anymore)
444444
* ls-files
445445
* diff-index
446446
* diff-tree

0 commit comments

Comments
 (0)