* Output from git diff-tree (documentation)
@ 2009-07-27 19:54 David Kågedal
2009-07-27 21:03 ` Junio C Hamano
2009-07-29 17:20 ` Output from git diff David Kågedal
0 siblings, 2 replies; 8+ messages in thread
From: David Kågedal @ 2009-07-27 19:54 UTC (permalink / raw)
To: Git Mailing List
The "git diff-tree HEAD" command (with the default raw output) starts
by printing a hash, which seems to be the hash for the commit (HEAD in
this case).
I can't find any description of this in the documentation for
diff-tree.
The "output format" sectionis the generic diff-format.txt that
describes the format of the lines for the files that differ. Nothing
wrong with that, but it doesn't explain the initial line of diff-tree.
The documentation of the --stdin flag mentions some initial output,
but that is not relevant in this case.
--
David Kågedal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Output from git diff-tree (documentation)
2009-07-27 19:54 Output from git diff-tree (documentation) David Kågedal
@ 2009-07-27 21:03 ` Junio C Hamano
[not found] ` <87vdld9694.fsf@krank.kagedal.org>
2009-07-29 17:20 ` Output from git diff David Kågedal
1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2009-07-27 21:03 UTC (permalink / raw)
To: David Kågedal; +Cc: Git Mailing List
David Kågedal <davidk@lysator.liu.se> writes:
> The "git diff-tree HEAD" command (with the default raw output) starts
> by printing a hash, which seems to be the hash for the commit (HEAD in
> this case).
That was because "git diff-tree" was the historical workhorse of "git
log". The latter literally was "rev-list HEAD | git diff-tree --stdin".
Giving a commit on the command line and giving one from the stdin was made
consistent. IOW, "rev-list HEAD | xargs -n1 git diff-tree" would give you
a similar output.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Output from git diff
2009-07-27 19:54 Output from git diff-tree (documentation) David Kågedal
2009-07-27 21:03 ` Junio C Hamano
@ 2009-07-29 17:20 ` David Kågedal
2009-07-29 17:29 ` Pat Notz
2009-07-29 18:26 ` Junio C Hamano
1 sibling, 2 replies; 8+ messages in thread
From: David Kågedal @ 2009-07-29 17:20 UTC (permalink / raw)
To: git
Here is another diff output question. The updated documentation in
diff-format.txt still claims that the output from the diff commands
has this format:
:100644 100644 bcd1234... 0123456... M file0
This is true for "git diff --raw", but diff-tree and friends print
full 40-char hashes.
I can get diff-tree to use abbreviated hashes with --abbrev, but how
do I tell diff to stop abbreviating?
And what should the documentation really say?
--
David Kågedal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Output from git diff
2009-07-29 17:20 ` Output from git diff David Kågedal
@ 2009-07-29 17:29 ` Pat Notz
2009-07-29 18:26 ` Junio C Hamano
1 sibling, 0 replies; 8+ messages in thread
From: Pat Notz @ 2009-07-29 17:29 UTC (permalink / raw)
To: David Kågedal; +Cc: git
On Wed, Jul 29, 2009 at 11:20 AM, David Kågedal<davidk@lysator.liu.se> wrote:
> Here is another diff output question. The updated documentation in
> diff-format.txt still claims that the output from the diff commands
> has this format:
>
> :100644 100644 bcd1234... 0123456... M file0
>
> This is true for "git diff --raw", but diff-tree and friends print
> full 40-char hashes.
>
> I can get diff-tree to use abbreviated hashes with --abbrev, but how
> do I tell diff to stop abbreviating?
Probably not the answer you *really* want but 'git diff --raw
--abbrev=40' will give you the full sha1
>
> And what should the documentation really say?
>
> --
> David Kågedal
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Output from git diff
2009-07-29 17:20 ` Output from git diff David Kågedal
2009-07-29 17:29 ` Pat Notz
@ 2009-07-29 18:26 ` Junio C Hamano
[not found] ` <87y6q6ehx8.fsf@krank.kagedal.org>
1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2009-07-29 18:26 UTC (permalink / raw)
To: David Kågedal; +Cc: git
David Kågedal <davidk@lysator.liu.se> writes:
> And what should the documentation really say?
"git diff" unlike "git diff-<whatiscompared>" is a Porcelain, to produce
human-readable output, and defaults to the abbreviated form.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-07-30 8:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27 19:54 Output from git diff-tree (documentation) David Kågedal
2009-07-27 21:03 ` Junio C Hamano
[not found] ` <87vdld9694.fsf@krank.kagedal.org>
[not found] ` <87prbl8ay5.fsf_-_@krank.kagedal.org>
2009-07-28 20:34 ` [PATCH] Update the documentation of the raw diff output format Junio C Hamano
2009-07-29 6:11 ` David Kågedal
2009-07-29 17:20 ` Output from git diff David Kågedal
2009-07-29 17:29 ` Pat Notz
2009-07-29 18:26 ` Junio C Hamano
[not found] ` <87y6q6ehx8.fsf@krank.kagedal.org>
2009-07-30 8:06 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).