ok/jj
1
0
Fork 0
forked from mirrors/jj
Commit graph

3 commits

Author SHA1 Message Date
Yuya Nishihara
e0965c4533 git: on push, update jj's view of remote branches without using import_refs()
This means that the commits previously pinned by remote branches are no longer
abandoned. I think that's more correct since "push" is the operation to
propagate local view to remote, and uninteresting commits should have been
locally abandoned.
2023-10-17 15:06:03 +09:00
Yuya Nishihara
ce0821f06d docs: adjust tracking branches design to deal with "fetch/push && undo"
The original idea was to completely replace git_refs with remotes["git"] by
introducing "forgotten" state, but it turned out to break "fetch && undo"
scenario. There are other ways around, but they also have problems:

* Sets tombstone on forgotten/deleted remote refs, exports remote refs without
  comparing to the known refs.
  * `jj undo` would need to insert tombstone by diffing old/new views.
  * `jj branch forget` would need to preserve the @git branch whereas the other
    remote branches would be forgotten.
* Always overwrites remote refs on export.
  * `jj git export` without importing would discard remote refs.

So, I decided to not remove git_refs. Apparently, it also improves the undo
behavior. In the new model, `jj git fetch && jj undo && jj git fetch` works
even if git_refs isn't rolled back. So we can unify the default of
`jj undo --what`.
2023-09-28 18:00:25 +09:00
Yuya Nishihara
aae9aa4a7a doc: add plan for non-tracking branches support
#1136, #1666, #1734
2023-08-23 09:58:01 +09:00