martinvonz / jj

A Git-compatible VCS that is both simple and powerful
https://martinvonz.github.io/jj/
Apache License 2.0
8.32k stars 284 forks source link

Update `jj edit <commit>` to add commit into view heads if not already #4427

Closed kevincliao closed 3 weeks ago

kevincliao commented 3 weeks ago

jj new <commit> automatically adds the checked out commits into the view head ids. However, jj edit does not.

To reproduce:

jj git init test
cd test
jj commit -m "my commit"
jj log -r @- -T commit_id # Save the id
jj abandon -r @-
jj edit <saved_id>

jj log -r :: # Does not show the currently editing commit 

Checklist

If applicable: