{"thread":{"id":"27923","subject":"listing changesets on a branch","startedAt":"2011-07-26T10:27:02Z","lastAt":"2011-07-26T11:46:17Z","messageCount":2,"participants":["Tajti Ákos","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"172046","messageId":"4E2E9676.5000307@intland.com","threadId":"27923","inReplyTo":null,"subject":"listing changesets on a branch","fromName":"Tajti Ákos","fromEmail":"akos.tajti@intland.com","sentAt":"2011-07-26T10:27:02Z","receivedAt":"2011-07-26T10:27:02Z","isPatch":false,"sender":{"key":"akos.tajti@intland.com","avatar":null},"body":"Dear List,\n\nI'd like to list the changesets between two commit ids, but only those, \nthat were committed on a specific branch. I tried to use the following \ncommand:\n\ngit log --branches=*/master rev1..rev2\n\nBut the result is not what I expected: i see sommits that were made on \nan other branch and were not merged to master. Could you please tell me \nwhat I am doing wrong?\n\nThanks in advance,\nÁkos Tajti\n"},{"id":"172053","messageId":"m38vrls1sy.fsf@localhost.localdomain","threadId":"27923","inReplyTo":"4E2E9676.5000307@intland.com","subject":"Re: listing changesets on a branch","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-07-26T11:46:17Z","receivedAt":"2011-07-26T11:46:17Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Tajti Ákos <akos.tajti@intland.com> writes:\n\n> I'd like to list the changesets between two commit ids, but only\n> those, that were committed on a specific branch. I tried to use the\n> following command:\n> \n> git log --branches=*/master rev1..rev2\n> \n> But the result is not what I expected: i see sommits that were made on\n> an other branch and were not merged to master. Could you please tell\n> me what I am doing wrong?\n\nIn Git there isn't such thing like \"commits made on a specific branch\".\nBranches are simply references to DAG, and \"on branch\" means commits\nreachable from branch tip (branch head).\n\nAnyway, try `--ancestry-path` option (in git-log(1) manpage), which\nmake Git show only those commits that are on line joining rev2 to\nrev1.  I guess it is what you really want.\n\nHTH\n-- \nJakub Narębski\n"}]}