* Shorthand for "$(git merge-base A B)"
@ 2019-03-15 18:58 John Passaro
2019-03-15 21:23 ` Jonathan Nieder
0 siblings, 1 reply; 3+ messages in thread
From: John Passaro @ 2019-03-15 18:58 UTC (permalink / raw)
To: git
I find myself fairly frequently doing something like "git log $(git
merge-base A B)..C". As far as I can tell, there is no shorthand for
the $() part of this, but it seems like something that could be pretty
naturally added, or documented better if there is some esoteric
combination of the existing shorthands that would support it.
Is there any way to support a shorthand for $(git merge-base A B)? I
hoped a joiner in the spirit of A..B could be used:
A::B
A*B
A%B
If not, maybe A@{mb:B} or something along those lines?
I can imagine this would be a non-trivial amount of work, just
wondering if there is interest, or if anybody has thoughts on the
notation?
Thanks,
John
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Shorthand for "$(git merge-base A B)"
2019-03-15 18:58 Shorthand for "$(git merge-base A B)" John Passaro
@ 2019-03-15 21:23 ` Jonathan Nieder
2019-03-18 5:27 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2019-03-15 21:23 UTC (permalink / raw)
To: John Passaro; +Cc: git
Hi,
John Passaro wrote:
> I find myself fairly frequently doing something like "git log $(git
> merge-base A B)..C".
Hm. Can you tell me more about the workflow / higher-level operation
where you do this?
Curious,
Jonathan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Shorthand for "$(git merge-base A B)"
2019-03-15 21:23 ` Jonathan Nieder
@ 2019-03-18 5:27 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2019-03-18 5:27 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: John Passaro, git
Jonathan Nieder <jrnieder@gmail.com> writes:
> John Passaro wrote:
>
>> I find myself fairly frequently doing something like "git log $(git
>> merge-base A B)..C".
>
> Hm. Can you tell me more about the workflow / higher-level operation
> where you do this?
Yes indeed, that would be interesting to learn. I can think of
reasons why "git log ^A ^B C" may be useful, but I do not think of a
case in which "git log --not $(git merge-base A B) --not C" [*1*]
would become useful.
[Footnote]
*1* As there can be more than one merge-base between A and B, the
right way to write what John wanted to write is to do the above.
A single "--not" says "until you see another --not, take all the
positive one from the command line as negative and vice versa".
You can also write it as "git log C --not $(git merge-base A B)".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-18 5:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15 18:58 Shorthand for "$(git merge-base A B)" John Passaro
2019-03-15 21:23 ` Jonathan Nieder
2019-03-18 5:27 ` Junio C Hamano
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).