{"thread":{"id":"35011","subject":"[PATCH] doc: don't claim that cherry-pick calls patch-id","startedAt":"2013-09-24T22:05:40Z","lastAt":"2013-09-24T22:58:03Z","messageCount":7,"participants":["Michael S. Tsirkin","Jonathan Nieder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"228179","messageId":"1380060333-2226-1-git-send-email-mst@redhat.com","threadId":"35011","inReplyTo":null,"subject":"[PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-09-24T22:05:40Z","receivedAt":"2013-09-24T22:05:40Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"The id is already different for binary files.\nLet's document that they are similar, not identical.\n\nCc: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Michael S. Tsirkin <mst@redhat.com>\n---\n Documentation/git-cherry.txt | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-cherry.txt b/Documentation/git-cherry.txt\nindex f6c19c7..66ff52f 100644\n--- a/Documentation/git-cherry.txt\n+++ b/Documentation/git-cherry.txt\n@@ -13,12 +13,13 @@ SYNOPSIS\n DESCRIPTION\n -----------\n The changeset (or \"diff\") of each commit between the fork-point and <head>\n-is compared against each commit between the fork-point and <upstream>.\n-The commits are compared with their 'patch id', obtained from\n-the 'git patch-id' program.\n+is compared against diff of each commit between the fork-point and <upstream>.\n+The diffs are compared with their diff id (sha1) calculated after removing\n+any whitespace and line numbers (similar but not necessarily identical\n+to 'patch id', obtained from the 'git patch-id' program).\n \n Every commit that doesn't exist in the <upstream> branch\n-has its id (sha1) reported, prefixed by a symbol.  The ones that have\n+has its diff id (sha1) reported, prefixed by a symbol.  The ones that have\n equivalent change already\n in the <upstream> branch are prefixed with a minus (-) sign, and those\n that only exist in the <head> branch are prefixed with a plus (+) symbol:\n-- \nMST\n"},{"id":"228181","messageId":"20130924221409.GT9464@google.com","threadId":"35011","inReplyTo":"1380060333-2226-1-git-send-email-mst@redhat.com","subject":"Re: [PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-24T22:14:09Z","receivedAt":"2013-09-24T22:14:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Michael S. Tsirkin wrote:\n\n> Subject: [PATCH] doc: don't claim that cherry-pick calls patch-id\n\ns/cherry-pick/cherry/\n\n> The id is already different for binary files.\n> Let's document that they are similar, not identical.\n\nThanks.\n\n[...]\n> --- a/Documentation/git-cherry.txt\n> +++ b/Documentation/git-cherry.txt\n> @@ -13,12 +13,13 @@ SYNOPSIS\n>  DESCRIPTION\n>  -----------\n>  The changeset (or \"diff\") of each commit between the fork-point and <head>\n> -is compared against each commit between the fork-point and <upstream>.\n> +is compared against diff of each commit between the fork-point and <upstream>.\n\nI think the old version of this sentence is clearer.\n\n> -The commits are compared with their 'patch id', obtained from\n> -the 'git patch-id' program.\n> +The diffs are compared with their diff id (sha1) calculated after removing\n> +any whitespace and line numbers (similar but not necessarily identical\n> +to 'patch id', obtained from the 'git patch-id' program).\n\nThe hash used internally is just an implementation detail, so maybe this\nsentence could just be dropped?\n\n>  Every commit that doesn't exist in the <upstream> branch\n> -has its id (sha1) reported, prefixed by a symbol.  The ones that have\n> +has its diff id (sha1) reported, prefixed by a symbol.  The ones that have\n\nConfusingly, here 'id' means 'commit name'.  For example:\n\n $ git log --oneline -1 sb/repack-in-c\n 0b63c6a repack: improve warnings about failure of renaming and removing files\n $ git cherry sb/repack-in-c^ sb/repack-in-c\n + 0b63c6a5b78f3fdd8c4e4fed4e535e7f4eed4257\n\nHope that helps,\nJonathan\n"},{"id":"228182","messageId":"20130924222822.GA2308@redhat.com","threadId":"35011","inReplyTo":"20130924221409.GT9464@google.com","subject":"Re: [PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-09-24T22:28:22Z","receivedAt":"2013-09-24T22:28:22Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"On Tue, Sep 24, 2013 at 03:14:09PM -0700, Jonathan Nieder wrote:\n> Michael S. Tsirkin wrote:\n> \n> > Subject: [PATCH] doc: don't claim that cherry-pick calls patch-id\n> \n> s/cherry-pick/cherry/\n> \n> > The id is already different for binary files.\n> > Let's document that they are similar, not identical.\n> \n> Thanks.\n> \n> [...]\n> > --- a/Documentation/git-cherry.txt\n> > +++ b/Documentation/git-cherry.txt\n> > @@ -13,12 +13,13 @@ SYNOPSIS\n> >  DESCRIPTION\n> >  -----------\n> >  The changeset (or \"diff\") of each commit between the fork-point and <head>\n> > -is compared against each commit between the fork-point and <upstream>.\n> > +is compared against diff of each commit between the fork-point and <upstream>.\n> \n> I think the old version of this sentence is clearer.\n> \n> > -The commits are compared with their 'patch id', obtained from\n> > -the 'git patch-id' program.\n> > +The diffs are compared with their diff id (sha1) calculated after removing\n> > +any whitespace and line numbers (similar but not necessarily identical\n> > +to 'patch id', obtained from the 'git patch-id' program).\n> \n> The hash used internally is just an implementation detail, so maybe this\n> sentence could just be dropped?\n\nI think the fact whitespace is ignored is relevant to users, no?\nWe probably should drop talking about hash here.\n\n> >  Every commit that doesn't exist in the <upstream> branch\n> > -has its id (sha1) reported, prefixed by a symbol.  The ones that have\n> > +has its diff id (sha1) reported, prefixed by a symbol.  The ones that have\n> \n> Confusingly, here 'id' means 'commit name'.  For example:\n> \n>  $ git log --oneline -1 sb/repack-in-c\n>  0b63c6a repack: improve warnings about failure of renaming and removing files\n>  $ git cherry sb/repack-in-c^ sb/repack-in-c\n>  + 0b63c6a5b78f3fdd8c4e4fed4e535e7f4eed4257\n> \n> Hope that helps,\n> Jonathan\n"},{"id":"228184","messageId":"20130924224431.GU9464@google.com","threadId":"35011","inReplyTo":"20130924222822.GA2308@redhat.com","subject":"Re: [PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-24T22:44:31Z","receivedAt":"2013-09-24T22:44:31Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Michael S. Tsirkin wrote:\n> On Tue, Sep 24, 2013 at 03:14:09PM -0700, Jonathan Nieder wrote:\n>> Michael S. Tsirkin wrote:\n\n>>> -The commits are compared with their 'patch id', obtained from\n>>> -the 'git patch-id' program.\n>>> +The diffs are compared with their diff id (sha1) calculated after removing\n>>> +any whitespace and line numbers (similar but not necessarily identical\n>>> +to 'patch id', obtained from the 'git patch-id' program).\n>>\n>> The hash used internally is just an implementation detail, so maybe this\n>> sentence could just be dropped?\n>\n> I think the fact whitespace is ignored is relevant to users, no?\n> We probably should drop talking about hash here.\n\nAh, good point.  So, something like the following, then?\n\n\tWhitespace and line numbers are ignored when comparing the diffs,\n\tsimilarly to linkgit:git-patch-id[1].\n\nMaybe some other wording would make it clearer that we are not using\n\"git diff -w\" output.\n"},{"id":"228185","messageId":"20130924225203.GA2521@redhat.com","threadId":"35011","inReplyTo":"20130924224431.GU9464@google.com","subject":"Re: [PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-09-24T22:52:03Z","receivedAt":"2013-09-24T22:52:03Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"On Tue, Sep 24, 2013 at 03:44:31PM -0700, Jonathan Nieder wrote:\n> Michael S. Tsirkin wrote:\n> > On Tue, Sep 24, 2013 at 03:14:09PM -0700, Jonathan Nieder wrote:\n> >> Michael S. Tsirkin wrote:\n> \n> >>> -The commits are compared with their 'patch id', obtained from\n> >>> -the 'git patch-id' program.\n> >>> +The diffs are compared with their diff id (sha1) calculated after removing\n> >>> +any whitespace and line numbers (similar but not necessarily identical\n> >>> +to 'patch id', obtained from the 'git patch-id' program).\n> >>\n> >> The hash used internally is just an implementation detail, so maybe this\n> >> sentence could just be dropped?\n> >\n> > I think the fact whitespace is ignored is relevant to users, no?\n> > We probably should drop talking about hash here.\n> \n> Ah, good point.  So, something like the following, then?\n> \n> \tWhitespace and line numbers are ignored when comparing the diffs,\n> \tsimilarly to linkgit:git-patch-id[1].\n> \n> Maybe some other wording would make it clearer that we are not using\n> \"git diff -w\" output.\n\nSee v2 that I sent, maybe that's clear enough.\n"},{"id":"228186","messageId":"20130924225356.GW9464@google.com","threadId":"35011","inReplyTo":"20130924225203.GA2521@redhat.com","subject":"Re: [PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-09-24T22:53:56Z","receivedAt":"2013-09-24T22:53:56Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Michael S. Tsirkin wrote:\n\n> See v2 that I sent, maybe that's clear enough.\n\nYep, looks sensible.  Thanks.\n"},{"id":"228187","messageId":"20130924225803.GA2533@redhat.com","threadId":"35011","inReplyTo":"20130924225356.GW9464@google.com","subject":"Re: [PATCH] doc: don't claim that cherry-pick calls patch-id","fromName":"Michael S. Tsirkin","fromEmail":"mst@redhat.com","sentAt":"2013-09-24T22:58:03Z","receivedAt":"2013-09-24T22:58:03Z","isPatch":true,"sender":{"key":"mst@kernel.org","avatar":null},"body":"On Tue, Sep 24, 2013 at 03:53:56PM -0700, Jonathan Nieder wrote:\n> Michael S. Tsirkin wrote:\n> \n> > See v2 that I sent, maybe that's clear enough.\n> \n> Yep, looks sensible.  Thanks.\n\nOK, ack that please :)\n"}]}