{"thread":{"id":"28726","subject":"Tracking cherry picks","startedAt":"2011-10-20T14:21:32Z","lastAt":"2011-10-21T09:52:34Z","messageCount":4,"participants":["Phillip Susi","Kirill Likhodedov","Ramkumar Ramachandra","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"178086","messageId":"4EA02E6C.2040608@cfl.rr.com","threadId":"28726","inReplyTo":null,"subject":"Tracking cherry picks","fromName":"Phillip Susi","fromEmail":"psusi@cfl.rr.com","sentAt":"2011-10-20T14:21:32Z","receivedAt":"2011-10-20T14:21:32Z","isPatch":false,"sender":{"key":"psusi@cfl.rr.com","avatar":null},"body":"I need to maintain a few stable release branches in addition to the \nmaster branch.  Sometimes a bug is found and the fix needs applied to \nmultiple branches.  I would like to be able to list what branches the \nfix has been applied to to validate that it went in everywhere it was \nneeded, but after cherry-picking the fix from master to the stable \nbranches, the SHA1 of the commit is different, and so git branch \n--contains does not think the commit was applied to each of the stable \nbranches.\n\nIs there a way around this?  Why doesn't git-cherrypick record the \noriginal SHA1 it was picked from in the commit?\n"},{"id":"178087","messageId":"37162B20-4758-433E-B11E-CE4B7FF27FBA@gmail.com","threadId":"28726","inReplyTo":"4EA02E6C.2040608@cfl.rr.com","subject":"Re: Tracking cherry picks","fromName":"Kirill Likhodedov","fromEmail":"klikh.list@gmail.com","sentAt":"2011-10-20T15:00:23Z","receivedAt":"2011-10-20T15:00:23Z","isPatch":false,"sender":{"key":"klikh.list@gmail.com","avatar":null},"body":"\n\n20.10.2011, в 18:21, Phillip Susi:\n>  Why doesn't git-cherrypick record the original SHA1 it was picked from in the commit?\n\nIt does if you specify \"-x\" option to cherry-pick\nSee the man for git-cherry-pick:\n\n-x\n           When recording the commit, append a line that says \"(cherry picked from commit ...)\" to the\n           original commit message in order to indicate which commit this change was cherry-picked from.\n           This is done only for cherry picks without conflicts. Do not use this option if you are\n           cherry-picking from your private branch because the information is useless to the recipient. If\n           on the other hand you are cherry-picking between two publicly visible branches (e.g. backporting\n           a fix to a maintenance branch for an older release from a development branch), adding this\n           information can be useful.\n"},{"id":"178088","messageId":"CALkWK0k-0vtD6OUtqKzzG9_aqGm2jsDY1k=xCR43TssvnHyLPg@mail.gmail.com","threadId":"28726","inReplyTo":"37162B20-4758-433E-B11E-CE4B7FF27FBA@gmail.com","subject":"Re: Tracking cherry picks","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2011-10-20T15:34:04Z","receivedAt":"2011-10-20T15:34:04Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nKirill Likhodedov writes:\n> 20.10.2011, в 18:21, Phillip Susi:\n>>  Why doesn't git-cherrypick record the original SHA1 it was picked from in the commit?\n>\n> It does if you specify \"-x\" option to cherry-pick\n> See the man for git-cherry-pick:\n> [...]\n\nRight.  As an interesting historical note, git has been omitting the\noriginal object name by default when cherry-picking/ reverting since\nabd6970a (cherry-pick: make -r the default, 2006-10-05).\n\n-- Ram\n"},{"id":"178116","messageId":"20111021095234.GA17219@elie.hsd1.il.comcast.net","threadId":"28726","inReplyTo":"4EA02E6C.2040608@cfl.rr.com","subject":"Re: Tracking cherry picks","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-10-21T09:52:34Z","receivedAt":"2011-10-21T09:52:34Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nPhillip Susi wrote:\n\n> Sometimes a bug is found and the fix needs applied to multiple\n> branches.  I would like to be able to list what branches the fix has been\n> applied to to validate that it went in everywhere it was needed, but after\n> cherry-picking the fix from master to the stable branches, the SHA1 of the\n> commit is different, and so git branch --contains does not think the commit\n> was applied to each of the stable branches.\n\nIf you base the fix on the oldest commit you think you might ever want to\napply it to, then you can reuse the same bugfix commit in all branches.\nSee gitworkflows(7) for more on this.\n\nHope that helps, and good luck,\nJonathan\n"}]}