{"thread":{"id":"50751","subject":"Shorthand for \"$(git merge-base A B)\"","startedAt":"2019-03-15T18:59:27Z","lastAt":"2019-03-18T05:27:34Z","messageCount":3,"participants":["John Passaro","Jonathan Nieder","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"371620","messageId":"CAJdN7KiS+6y0a3sj0yuGuJ+URJe0SBJJTRg2ZpA2upN2rwZXCA@mail.gmail.com","threadId":"50751","inReplyTo":null,"subject":"Shorthand for \"$(git merge-base A B)\"","fromName":"John Passaro","fromEmail":"john.a.passaro@gmail.com","sentAt":"2019-03-15T18:58:48Z","receivedAt":"2019-03-15T18:59:27Z","isPatch":false,"sender":{"key":"john.a.passaro@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6754005?v=4"},"body":"I find myself fairly frequently doing something like \"git log $(git\nmerge-base A B)..C\". As far as I can tell, there is no shorthand for\nthe $() part of this, but it seems like something that could be pretty\nnaturally added, or documented better if there is some esoteric\ncombination of the existing shorthands that would support it.\n\nIs there any way to support a shorthand for $(git merge-base A B)? I\nhoped a joiner in the spirit of A..B could be used:\n\nA::B\nA*B\nA%B\nIf not, maybe A@{mb:B} or something along those lines?\n\nI can imagine this would be a non-trivial amount of work, just\nwondering if there is interest, or if anybody has thoughts on the\nnotation?\n\nThanks,\nJohn\n"},{"id":"371630","messageId":"20190315212312.GA51592@google.com","threadId":"50751","inReplyTo":"CAJdN7KiS+6y0a3sj0yuGuJ+URJe0SBJJTRg2ZpA2upN2rwZXCA@mail.gmail.com","subject":"Re: Shorthand for \"$(git merge-base A B)\"","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2019-03-15T21:23:12Z","receivedAt":"2019-03-15T21:23:17Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nJohn Passaro wrote:\n\n> I find myself fairly frequently doing something like \"git log $(git\n> merge-base A B)..C\".\n\nHm.  Can you tell me more about the workflow / higher-level operation\nwhere you do this?\n\nCurious,\nJonathan\n"},{"id":"371773","messageId":"xmqqva0g4uri.fsf@gitster-ct.c.googlers.com","threadId":"50751","inReplyTo":"20190315212312.GA51592@google.com","subject":"Re: Shorthand for \"$(git merge-base A B)\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-18T05:27:29Z","receivedAt":"2019-03-18T05:27:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> John Passaro wrote:\n>\n>> I find myself fairly frequently doing something like \"git log $(git\n>> merge-base A B)..C\".\n>\n> Hm.  Can you tell me more about the workflow / higher-level operation\n> where you do this?\n\nYes indeed, that would be interesting to learn.  I can think of\nreasons why \"git log ^A ^B C\" may be useful, but I do not think of a\ncase in which \"git log --not $(git merge-base A B) --not C\" [*1*]\nwould become useful.\n\n[Footnote]\n\n*1* As there can be more than one merge-base between A and B, the\n right way to write what John wanted to write is to do the above.\n A single \"--not\" says \"until you see another --not, take all the\n positive one from the command line as negative and vice versa\".\n You can also write it as \"git log C --not $(git merge-base A B)\".\n\n"}]}