Skip to content

Commit

Permalink
Turn on recursive with --summary
Browse files Browse the repository at this point in the history
This makes "git log/diff --summary" imply recursive behaviour,
whose effect is summarized in one test output:

    --- a/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial
    +++ b/t/t4013/diff.diff-tree_--pretty_--root_--summary_initial
    @@ -5,7 +5,7 @@ Date:   Mon Jun 26 00:00:00 2006 +0000

	 Initial

    - create mode 040000 dir
    + create mode 100644 dir/sub
      create mode 100644 file0
      create mode 100644 file2
     $

When a file is created in a subdirectory, we used to say just
the directory name only when that directory also was created,
which did not make sense from two reasons.  It is not any more
significant to create a new file in a new directory than to
create a new file in an existing directory, and even if it were,
reportinging the new directory name without saying the actual
filename is not useful.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Oct 5, 2006
1 parent 51a7c66 commit d7014dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,7 @@ int diff_setup_done(struct diff_options *options)
*/
if (options->output_format & (DIFF_FORMAT_PATCH |
DIFF_FORMAT_DIFFSTAT |
DIFF_FORMAT_SUMMARY |
DIFF_FORMAT_CHECKDIFF))
options->recursive = 1;
/*
Expand Down
2 changes: 1 addition & 1 deletion t/t4013/diff.diff-tree_--pretty_--root_--summary_initial
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Date: Mon Jun 26 00:00:00 2006 +0000

Initial

create mode 040000 dir
create mode 100644 dir/sub
create mode 100644 file0
create mode 100644 file2
$

0 comments on commit d7014dc

Please sign in to comment.