You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It's always bothered me that jj diff -r X cannot be written as jj diff --to X --from <something> because X- might resolve to multiple revisions. There are other such examples like in jj restore.
A related to case that came up on Discord was that jj restore could be used for resolving a conflict in favor of a particular side of the conflict if we had a way of selecting a given tree from a conflict.
Describe the solution you'd like
Commands that currently take a revision argument only to resolve it to a tree (e.g. jj diff --from/--to, jj restore --from, jj file show -r) could take a new kind of expression instead of a revset. The new expression would allow regular revset but will resolve to a tree instead. By default, the revset is expected to resolve to a single revision and we use that revision's tree (merged if a conflict). But the user can also do something like jj diff --from 'merge_of(X-)' --to Y to merge the commits inX-, or jj restore --from 'conflict_side(X, 1)'.
Describe alternatives you've considered
We've talked about making revsets themselves able to calculate merges of commits. I don't like that idea because it complicates revsets, and it means that the merged result would presumably be assigned to a commit (with some placeholder description etc) to fit into the revset language.
The text was updated successfully, but these errors were encountered:
A related to case that came up on Discord was that jj restore could be used for resolving a conflict in favor of a particular side of the conflict if we had a way of selecting a given tree from a conflict.
Is your feature request related to a problem? Please describe.
It's always bothered me that
jj diff -r X
cannot be written asjj diff --to X --from <something>
becauseX-
might resolve to multiple revisions. There are other such examples like injj restore
.A related to case that came up on Discord was that
jj restore
could be used for resolving a conflict in favor of a particular side of the conflict if we had a way of selecting a given tree from a conflict.Describe the solution you'd like
Commands that currently take a revision argument only to resolve it to a tree (e.g.
jj diff --from/--to
,jj restore --from
,jj file show -r
) could take a new kind of expression instead of a revset. The new expression would allow regular revset but will resolve to a tree instead. By default, the revset is expected to resolve to a single revision and we use that revision's tree (merged if a conflict). But the user can also do something likejj diff --from 'merge_of(X-)' --to Y
to merge the commits inX-
, orjj restore --from 'conflict_side(X, 1)'
.Describe alternatives you've considered
We've talked about making revsets themselves able to calculate merges of commits. I don't like that idea because it complicates revsets, and it means that the merged result would presumably be assigned to a commit (with some placeholder description etc) to fit into the revset language.
The text was updated successfully, but these errors were encountered: