ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Yuya Nishihara b8e921eeae cli: branch: add "move" command that can update branches by revset or name
This basically supersedes the current "branch set" command. The plan is to turn
"branch set" into an "upsert" command, and deprecate "branch create". (#3584)
Maybe we can also add "branch set --new" flag to only allow creation of new
branches. One reason behind this proposed change is that "set" usually allows
both "creation" and "update". However, we also need a typo-safe version of
"set" to not create new branches by accident.

"jj branch move" is useful when advancing ancestor branches. Let's say you've
added a couple of commits on top of an existing PR branch, you can advance the
branch by "jj branch move --from 'heads(::@- & branches())' --to @-". If this
pattern is super common, maybe we can add --advance flag for short.

One drawback of this change is that "git branch --move" is equivalent to
"jj branch rename". I personally don't find this is confusing, but it's true
that "move" sometimes means "rename".
2024-06-18 12:48:32 +09:00
..
examples revset: replace ParseState with &RevsetParseContext 2024-06-05 10:39:32 +09:00
src cli: branch: add "move" command that can update branches by revset or name 2024-06-18 12:48:32 +09:00
testing cli: add a fake code formatter tool for testing 2024-06-04 14:28:21 -05:00
tests cli: branch: add "move" command that can update branches by revset or name 2024-06-18 12:48:32 +09:00
build.rs build: update rerun-if conditions to watch .git/HEAD in colocated repo 2023-08-06 12:16:11 +09:00
Cargo.toml cli: implement enough of jj fix to run a single tool on all files 2024-06-04 14:28:21 -05:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00