Replies: 3 comments 8 replies
-
Here's a monstrosity I came up with for the 2 case:
|
Beta Was this translation helpful? Give feedback.
-
I think you can write |
Beta Was this translation helpful? Give feedback.
-
I'm not sure exactly what you're looking for. Let's say you have this history:
If you now have You might have instead only wanted The same thing was asked on Discord a while ago (here). I looped you in there but I'm not sure you're on Discord these days, and it's useful to have an answer here anyway. For the 2-argument case, see @arxanas reply (it was that reply that prompted me to finish this draft I had since yesterday). |
Beta Was this translation helpful? Give feedback.
-
Suppose I have something like this:
A revset operation I often want to perform is: "given a set of commits, get me everything from their least common ancestor to them" (generally to pass to
jj log
).For example, if we're interested in the two commits
f
andd
, the least common ancestor isb
, so the revset I want would beb::(d | f)
(let's suppose we don't want any hypothetical descendants ofd
orf
). We can see that easily here, because we can see the whole history and it's small and simple.But how do I perform this operation more generally? Ie in cases where the common ancestor is obscured by
(elided revisions)
, or I just don't want to have to find it visually in a messy commit graph.If I had a least common ancestor function, say,
lca()
, I could writelca(d | f)::(d | f)
. Or, preferably there would just be a function that takes a revsetr
tolca(r)::r
. I don't know what a good name for this operation is though. Some sort of closure?Is there an existing way or does this need to be added?
Beta Was this translation helpful? Give feedback.
All reactions