git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] Documentation/git-patch-id: give working code example
@ 2016-08-24 12:56 Michael J Gruber
  2016-08-24 16:18 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Michael J Gruber @ 2016-08-24 12:56 UTC (permalink / raw)
  To: git

As it stands, the documentation gives the impression that

git diff-tree <treeish> | git patch-id

would be a working invocation of git patch-id, leaving the novice user
in the dark.

Make it explicit that 'git diff-tree -p' would be the command to use.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-patch-id.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt
index cf71fba..67f8e28 100644
--- a/Documentation/git-patch-id.txt
+++ b/Documentation/git-patch-id.txt
@@ -21,7 +21,7 @@ have the same "patch ID" are almost guaranteed to be the same thing.
 
 IOW, you can use this thing to look for likely duplicate commits.
 
-When dealing with 'git diff-tree' output, it takes advantage of
+When dealing with 'git diff-tree -p' output, it takes advantage of
 the fact that the patch is prefixed with the object name of the
 commit, and outputs two 40-byte hexadecimal strings.  The first
 string is the patch ID, and the second string is the commit ID.
-- 
2.10.0.rc0.268.ge3ba28a


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Documentation/git-patch-id: give working code example
  2016-08-24 12:56 [PATCH] Documentation/git-patch-id: give working code example Michael J Gruber
@ 2016-08-24 16:18 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2016-08-24 16:18 UTC (permalink / raw)
  To: Michael J Gruber; +Cc: git

Michael J Gruber <git@drmicha.warpmail.net> writes:

> As it stands, the documentation gives the impression that
>
> git diff-tree <treeish> | git patch-id
>
> would be a working invocation of git patch-id, leaving the novice user
> in the dark.
>
> Make it explicit that 'git diff-tree -p' would be the command to use.

I take the lack of <treeish> as a strong hint that it is not meant
to be the full command line but merely there to make the command the
description talks about stand out from others (i.e. "This
description does not apply to 'diff-files' or 'diff-cache' output").

So I would think it is fine as-is.

Having said that, if we were to change something, I would rather
replace the mention of "diff-tree" with something like "git show" or
"git log -p", neither of which were even present in their current
form back when this piece of text was written.

>
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
> ---
>  Documentation/git-patch-id.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/git-patch-id.txt b/Documentation/git-patch-id.txt
> index cf71fba..67f8e28 100644
> --- a/Documentation/git-patch-id.txt
> +++ b/Documentation/git-patch-id.txt
> @@ -21,7 +21,7 @@ have the same "patch ID" are almost guaranteed to be the same thing.
>  
>  IOW, you can use this thing to look for likely duplicate commits.
>  
> -When dealing with 'git diff-tree' output, it takes advantage of
> +When dealing with 'git diff-tree -p' output, it takes advantage of
>  the fact that the patch is prefixed with the object name of the
>  commit, and outputs two 40-byte hexadecimal strings.  The first
>  string is the patch ID, and the second string is the commit ID.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-24 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 12:56 [PATCH] Documentation/git-patch-id: give working code example Michael J Gruber
2016-08-24 16:18 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).