26 ms·
Oh yeah I forgot HEAD Is a ref, whoops. Duh! (My git is getting rusty at this point...) jj still ends up keeping information in here that the reflog doesnt, bu
by steveklabnik 1y ago
Oh yeah I forgot HEAD Is a ref, whoops. Duh! (My git is getting rusty at this point...)
jj still ends up keeping information in here that the reflog doesnt, but you're right that these aren't the strongest points.
- 1718627440 1y agoWhich, the stuff you said earlier is in the reflog? I think Git will just gain a oplog. You just need to append a commit hash to a list before each command and implement undo as remove item and checkout. The hardest thing will be race conditions, but Git already knows how to be a database.
- martinvonz 1y agoOne little benefit of the op log is that you can use a single `jj undo` to undo all the rebased branches/bookmarks in one go. If you have rebased many branches with `git rebase --update-refs`, you need to reset each of the branches separately AFAIK.
- 1718627440 1y ago--update-refs, --no-update-refs Automatically force-update any branches that point to commits that are being rebased. Any branches that are checked out in a worktree are not updated in this way. If the configuration variable rebase.updateRefs is set, then this option can be used to override and disable this setting.
- martinvonz 1y agoAre you saying that that text implies that the you can undo the rebase with a single command or that all the reflogs get updated atomically? Or how is it related to the comment you replied to?
- 1718627440 1y agoOops. No the text implies that I can't read and answered to a claim which you didn't state, namely that --update-refs can only update specific refs. (This was given by another comment.) Yes, this is something, that JJ provides and Git does not.