public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Ed Avis <eda@waniasset•com>
Cc: git@vger•kernel.org
Subject: Re: git log --raw abbreviates SHA1s, despite what manual says
Date: Fri, 15 May 2015 17:08:38 +0200	[thread overview]
Message-ID: <vpqfv6xc1zd.fsf@anie.imag.fr> (raw)
In-Reply-To: <loom.20150515T164345-901@post.gmane.org> (Ed Avis's message of "Fri, 15 May 2015 14:46:14 +0000 (UTC)")

Ed Avis <eda@waniasset•com> writes:

> The manual page for git-log says:
>
>            The raw format shows the entire commit exactly as stored in the
>            commit object. Notably, the SHA-1s are displayed in full,
>            regardless of whether --abbrev or --no-abbrev are used,

It says "the raw format", not "the --raw option". The paragraph you cite
is under the PRETTY FORMAT section, hence documents what you can give as
argument to --format.

> But this is not quite true.  Here is an example line from 'git log --raw':
>
>     :100644 100644 9a203c9... daa08a7... M  myfilename

But

git log --format=raw generates an output format with full sha1.

Actually, the documentation *is* misleading, but not the part you're
quoting:

  COMMON DIFF OPTIONS
             [...]
         --raw
             Generate the raw format.

It is not very clear that --raw means to generate _the diff_ in raw
format.

Probably this patch to the doc would be an improvement IMHO:

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index ccd4998..0b50717 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -41,8 +41,11 @@ endif::git-format-patch[]
 
 ifndef::git-format-patch[]
 --raw::
-	Generate the raw format.
+	Generate the raw diff format.
 	{git-diff-core? This is the default.}
+ifdef::git-log[]
+	See the "RAW OUTPUT FORMAT" section of linkgit:git-diff[1].
+endif::git-log[]
 endif::git-format-patch[]
 
 ifndef::git-format-patch[]

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2015-05-15 15:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 14:46 git log --raw abbreviates SHA1s, despite what manual says Ed Avis
2015-05-15 15:08 ` Matthieu Moy [this message]
2015-05-15 15:22   ` Ed Avis
2015-05-15 15:33     ` Ed Avis
2015-05-15 15:42     ` Matthieu Moy
2015-05-15 15:44       ` [PATCH] Documentation/log: clarify what --raw means Matthieu Moy
2015-05-15 15:47         ` Ed Avis
2015-05-15 17:44           ` Junio C Hamano
2015-05-15 17:29         ` Eric Sunshine
2015-05-15 17:38         ` Junio C Hamano
2015-05-18 17:51           ` Matthieu Moy
2015-05-18 17:55           ` [PATCH v2 1/2] " Matthieu Moy
2015-05-18 17:55             ` [PATCH v2 2/2] Documentation/log: clarify sha1 non-abbreviation in log --raw Matthieu Moy
2015-05-18 20:52               ` Junio C Hamano
2015-05-18 21:28                 ` Matthieu Moy
2015-05-18 22:29                   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqfv6xc1zd.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp$(echo .)fr \
    --cc=eda@waniasset$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox