Skip to content

Commit 170c043

Browse files
committed
Porcelain level "log" family should recurse when diffing.
Most notably, "git log --name-status" stopped at top level directory changes without "-r" option. Signed-off-by: Junio C Hamano <[email protected]>
1 parent a005085 commit 170c043

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Documentation/git-log.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ git log --since="2 weeks ago" \-- gitk::
9696
The "--" is necessary to avoid confusion with the *branch* named
9797
'gitk'
9898

99-
git log -r --name-status release..test::
99+
git log --name-status release..test::
100100

101101
Show the commits that are in the "test" branch but not yet
102102
in the "release" branch, along with the list of paths

Documentation/user-manual.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ file such that it contained the given content either before or after the
921921
commit. You can find out with this:
922922

923923
-------------------------------------------------
924-
$ git log --raw -r --abbrev=40 --pretty=oneline -- filename |
924+
$ git log --raw --abbrev=40 --pretty=oneline -- filename |
925925
grep -B 1 `git hash-object filename`
926926
-------------------------------------------------
927927

builtin-log.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ static void cmd_log_init(int argc, const char **argv, const char *prefix,
5555
rev->abbrev = DEFAULT_ABBREV;
5656
rev->commit_format = CMIT_FMT_DEFAULT;
5757
rev->verbose_header = 1;
58+
rev->diffopt.recursive = 1;
5859
rev->show_root_diff = default_show_root;
5960
rev->subject_prefix = fmt_patch_subject_prefix;
6061
argc = setup_revisions(argc, argv, rev, "HEAD");
@@ -116,7 +117,6 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
116117
git_config(git_log_config);
117118
init_revisions(&rev, prefix);
118119
rev.diff = 1;
119-
rev.diffopt.recursive = 1;
120120
rev.simplify_history = 0;
121121
cmd_log_init(argc, argv, prefix, &rev);
122122
if (!rev.diffopt.output_format)
@@ -165,7 +165,6 @@ int cmd_show(int argc, const char **argv, const char *prefix)
165165
git_config(git_log_config);
166166
init_revisions(&rev, prefix);
167167
rev.diff = 1;
168-
rev.diffopt.recursive = 1;
169168
rev.combine_merges = 1;
170169
rev.dense_combined_merges = 1;
171170
rev.always_show_header = 1;

0 commit comments

Comments
 (0)