Thread (8 messages) 8 messages, 3 authors, 2016-06-15
DORMANTno replies
Revisions (4)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]

[PATCH 0/5] Make "git show -s" easier to discover for users

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:58:10

Stefan Beller [off-list ref] writes:
quoted
However I sometimes also get:
sb@sb:~/OSS/git$ git show --format="%ad" 0da7a53
Fri Jul 12 10:49:34 2013 -0700
diff --git a/Documentation/RelNotes/1.8.4.txt
b/Documentation/RelNotes/1.8.4.txt
index 0e50df8..4250e5a 100644
--- a/Documentation/RelNotes/1.8.4.txt
+++ b/Documentation/RelNotes/1.8.4.txt
"git show" will show the diff by default. For merge commits, it shows
the --cc diff which is often empty, hence the behavior you see.

You want to use "git show -s", which suppresses the patch output.
... and this "git show -s" is extraordinarily hard to discover, as it
is only documented in "git log --help". Google has been my friend
here, but we should really improve that.

This patch series does essentially two things:

* Add a --no-patch synonym for -s. I'm actually wondering why the
  option wasn't called this way from the beginning.

* Reorganize the doc so that "git show" actually mentions it.

While we're there, there's a reformatting patch, and one to make "git
log --no-patch --patch" actually show the patch.

(60aa9cf8f3, Documentation: document show -s, Tue Nov 9 11:12:48 2010
actually acknowledged that the documentation wasn't complete and that
something else was needed, this should be it)

Matthieu Moy (5):
  diff: allow --no-patch as synonym for -s
  diff: allow --patch to override -s/--no-patch
  Documentation/git-show.txt: include common diff options, like
    git-log.txt
  Documentation: move description of -s, --no-patch to diff-options.txt
  Documentation/git-log.txt: capitalize section names

 Documentation/diff-options.txt     | 5 +++++
 Documentation/git-log.txt          | 8 ++++----
 Documentation/git-show.txt         | 9 +++++++++
 Documentation/rev-list-options.txt | 3 ---
 diff.c                             | 7 ++++---
 5 files changed, 22 insertions(+), 10 deletions(-)

-- 
1.8.3.1.495.g13f33cf.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help