diff options
author | Jeff King <peff@peff.net> | 2016-07-22 15:51:41 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-22 13:47:33 -0700 |
commit | d38c7b2c2ce0116215eb05e11d442e9d03b887f4 (patch) | |
tree | 4d919ce6e2f91a163b5adf9139d6f6ab2115e68a /Documentation/pretty-formats.txt | |
parent | doc/pretty-formats: describe index/time formats for %gd (diff) | |
download | tgif-d38c7b2c2ce0116215eb05e11d442e9d03b887f4.tar.xz |
doc/pretty-formats: explain shortening of %gd
The actual shortening rules aren't that interesting and
probably not worth getting into (I gloss over them here as
"shortened for human readability"). But the fact that %gD
shows whatever you gave on the command line is subtle and
worth mentioning. Since most people will feed a shortened
refname in the first place, it otherwise makes it hard to
understand the difference between the two.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/pretty-formats.txt')
-rw-r--r-- | Documentation/pretty-formats.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 36a300ae4f..b95d67ec01 100644 --- a/Documentation/pretty-formats.txt +++ b/Documentation/pretty-formats.txt @@ -149,9 +149,12 @@ endif::git-rev-list[] - '%GK': show the key used to sign a signed commit - '%gD': reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2 minutes ago`}; the format follows the rules described - for the `-g` option -- '%gd': shortened reflog selector, e.g., `stash@{1}` or - `stash@{2 minutes ago}` + for the `-g` option. The portion before the `@` is the refname as + given on the command line (so `git log -g refs/heads/master` would + yield `refs/heads/master@{0}`). +- '%gd': shortened reflog selector; same as `%gD`, but the refname + portion is shortened for human readability (so `refs/heads/master` + becomes just `master`). - '%gn': reflog identity name - '%gN': reflog identity name (respecting .mailmap, see linkgit:git-shortlog[1] or linkgit:git-blame[1]) |