{"thread":{"id":"14596","subject":"Difficulty with getting an accurate changelog after cherry-picking and merging.","startedAt":"2008-07-22T20:38:19Z","lastAt":"2008-07-22T21:14:42Z","messageCount":3,"participants":["Luuk Paulussen","Alex Riesen","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"84362","messageId":"7dc909980807221338g707d6104ob8b1534cdf02a77a@mail.gmail.com","threadId":"14596","inReplyTo":null,"subject":"Difficulty with getting an accurate changelog after cherry-picking and merging.","fromName":"Luuk Paulussen","fromEmail":"luuk.paulussen@gmail.com","sentAt":"2008-07-22T20:38:19Z","receivedAt":"2008-07-22T20:38:19Z","isPatch":false,"sender":{"key":"luuk.paulussen@gmail.com","avatar":null},"body":"Hi,\n\nI'm trying to generate an accurate changelog of changes between 2 tags\non a branch.  There is a merge between these 2 points which includes\nchanges that were cherry-picked before the start point.  This causes\nthe changelog to show these changes, despite them already existing\nbefore the start point of the log.\n\nI've included a test script below that creates a repository that shows\na simplified version of the issue.  Basically, I want the changelog to\nonly show the changes between the start and end tags, which are test4\nand test5, but I get a list that also includes other commits.  I have\ntried git-cherry and git-log with --cherry-pick and various things\nwith git-rev-list and git-merge-base.\n\n#!/bin/sh\nmkdir testrepo\ncd testrepo\ngit init\necho initial > testfile\ngit add testfile\ngit commit -m initial\ngit branch stable\nfor f in $(seq 1 5)\ndo\n    echo test$f >> testfile\n    git commit -a -m test$f\ndone\n#without this sleep the cherry-picks end up with the same hash as\ntheir original commit...\nsleep 1\ngit checkout stable\ngit cherry-pick :/test1\ngit cherry-pick :/test2\ngit cherry-pick :/test3\ngit tag start\ngit cherry-pick :/test4\ngit merge master\n#Clean up the merge error.\nif [ ! $? -eq 0 ]\nthen\n    sed -i \"/[:=]/ d\" testfile\n    git commit -a -m \"Merge branch 'master' into stable\"\nfi\ngit tag end\n##########################\n\nThanks,\nLuuk\n"},{"id":"84366","messageId":"20080722210924.GE5113@blimp.local","threadId":"14596","inReplyTo":"7dc909980807221338g707d6104ob8b1534cdf02a77a@mail.gmail.com","subject":"Re: Difficulty with getting an accurate changelog after cherry-picking and merging.","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-07-22T21:09:24Z","receivedAt":"2008-07-22T21:09:24Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Luuk Paulussen, Tue, Jul 22, 2008 22:38:19 +0200:\n> I'm trying to generate an accurate changelog of changes between 2 tags\n> on a branch.  There is a merge between these 2 points which includes\n> changes that were cherry-picked before the start point.  This causes\n> the changelog to show these changes, despite them already existing\n> before the start point of the log.\n\nCherry-picked commits are completely new commits and have no relation\nto the original commits whatsoever. Of course, they will be shown.\nIt is literally a change made again, as if you typed it all in and\ncommitted.\n"},{"id":"84367","messageId":"alpine.DEB.1.00.0807222209180.8986@racer","threadId":"14596","inReplyTo":"7dc909980807221338g707d6104ob8b1534cdf02a77a@mail.gmail.com","subject":"Re: Difficulty with getting an accurate changelog after cherry-picking and merging.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-22T21:14:42Z","receivedAt":"2008-07-22T21:14:42Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 23 Jul 2008, Luuk Paulussen wrote:\n\n> I'm trying to generate an accurate changelog of changes between 2 tags \n> on a branch.  There is a merge between these 2 points which includes \n> changes that were cherry-picked before the start point.  This causes the \n> changelog to show these changes, despite them already existing before \n> the start point of the log.\n>\n> [...]\n> \n> I have tried git-cherry and git-log with --cherry-pick and various \n> things with git-rev-list and git-merge-base.\n\ncherry and --cherry-pick will only skip patches that are on the \nuninteresting side of a \"...\" range.\n\nI guess that\n\n\t$ git log --cherry-pick master...HEAD^\n\nshould filter the commits out, but I haven't tried.\n\n> git cherry-pick :/test1\n\nHeh, that is the first time I see :/ in the wild.  I do not use it \nanymore, and in your case, I would have written \"git cherry-pick master^4\" \nto be more precise (and not accidentally pick up a wrong one).\n\nCiao,\nDscho\n"}]}