Re: [PATCH] Documentation/git-diff: remove -r from --name-status example
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 29, 2007, 11:14 UTC
- Message-ID
- <Pine.LNX.4.64.0707291214060.14781@racer.site>
- In-Reply-To
- <20070729094955.GA14915@coredump.intra.peff.net>
Hi,
On Sun, 29 Jul 2007, Jeff King wrote:
Show 22 quoted lines
> -- >8 --
> git-diff: turn on recursion by default
>
> The tree recursion behavior of git-diff may appear
> inconsistent to the user because it depends on the format of
> the patch as well as whether one is diffing between trees or
> against the index.
>
> Since git-diff is a porcelain wrapper for low-level diff
> commands, it makes sense for its behavior to be consistent
> no matter what is being diffed. This patch turns on
> recursion in all cases.
>
> diff --git a/builtin-diff.c b/builtin-diff.c
> index 7f367b6..b48121e 100644
> --- a/builtin-diff.c
> +++ b/builtin-diff.c
> @@ -233,6 +233,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
> die("diff_setup_done failed");
> }
> rev.diffopt.allow_external = 1;
> + rev.diffopt.recursive = 1;How about
if (!rev.diffopt.quiet) rev.diffopt.recursive = 1;
instead?
Ciao, Dscho