-
Notifications
You must be signed in to change notification settings - Fork 680
Description
Is your feature request related to a problem? Please describe.
When abandoning a revision or a whole revset, we may sometimes miss that we are also deleting the local tracked bookmarks pointing to them, which could lead to unwanted deletion from the remote the next time a jj git push --tracked
is done.
It happened to me quite a few times that I would accidentally delete bookmarks after doing a rebase that resulted in divergent revisions. Sometimes I would notice before pushing, and sometimes not.
In general I think jj abandon
is a bit too lenient.
Describe the solution you'd like
I would like jj abandon
to fail when a revision to abandon is pointed to by a tracked bookmark.
Or even, more drastically, by any bookmark at all. I think that any bookmark deletion should always be explicit.
Two possibilities:
- In the spirit of other flags (like
jj bookmark move --allow-backwards
orjj edit --ignore-immutable
),jj abandon
could provide a--delete-(tracked-)bookmarks
flag that should be mandatory - simply require the user to first perform a
jj bookmark forget
orjj bookmark delete
Describe alternatives you've considered
Not using jj git push
with --tracked
, but mistakes happen. And in any case, it's better to make sure the bookmark deletion was really what the user wanted from the start, rather than mitigating the consequences later.