From 66b2ed09c2f0f212c5cd5c095c1f1052ecbb9491 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 20 Jan 2010 13:59:36 -0800 Subject: Fix "log" family not to be too agressive about showing notes Giving "Notes" information in the default output format of "log" and "show" is a sensible progress (the user has asked for it by having the notes), but for some commands (e.g. "format-patch") spewing notes into the formatted commit log message without being asked is too aggressive. Enable notes output only for "log", "show", "whatchanged" by default and only when the user didn't ask any specific --pretty/--format from the command line; users can explicitly override this default with --show-notes and --no-notes option. Parts of tests are taken from Jeff King's fix. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/pretty-options.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation') diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt index bff94991b6..1401200920 100644 --- a/Documentation/pretty-options.txt +++ b/Documentation/pretty-options.txt @@ -28,3 +28,11 @@ people using 80-column terminals. command to re-code the commit log message in the encoding preferred by the user. For non plumbing commands this defaults to UTF-8. + +--no-notes:: +--show-notes:: + Show the notes (see linkgit:git-notes[1]) that annotate the + commit, when showing the commit log message. This is the default + for `git log`, `git show` and `git whatchanged` commands when + there is no `--pretty` nor `--format` option is given on the + command line. -- cgit v1.2.3 From 7dccadf363f9d9ff564ad34117266b2d557a2bc8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 21 Jan 2010 14:57:41 -0800 Subject: Fix "log --oneline" not to show notes This option should be treated pretty much the same as --format="%h %s". Signed-off-by: Junio C Hamano --- Documentation/pretty-options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/pretty-options.txt b/Documentation/pretty-options.txt index 1401200920..aa96caeab2 100644 --- a/Documentation/pretty-options.txt +++ b/Documentation/pretty-options.txt @@ -34,5 +34,5 @@ people using 80-column terminals. Show the notes (see linkgit:git-notes[1]) that annotate the commit, when showing the commit log message. This is the default for `git log`, `git show` and `git whatchanged` commands when - there is no `--pretty` nor `--format` option is given on the - command line. + there is no `--pretty`, `--format` nor `--oneline` option is + given on the command line. -- cgit v1.2.3