-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
view: add tracking state to RemoteRef
The state field isn't saved yet. git import/export code paths are migrated, but new tracking state is always calculated based on git.auto-local-branch setting. So the tracking state is effectively a global flag. As we don't know whether the existing remote branches have been merged in to local branches, we assume that remote branches are "tracking" so long as the local counterparts exist. This means existing locally-deleted branch won't be pushed without re-tracking it. I think it's rare to leave locally-deleted branches for long. For "git.auto-local-branch = false" setup, users might have to untrack branches if they've manually "merged" remote branches and want to continue that workflow. I considered using git.auto-local-branch setting in the migration path, but I don't think that would give a better result. The setting may be toggled after the branches got merged, and I'm planning to change it default off for better Git interop. Implementation-wise, the state enum can be a simple bool. It's enum just because I originally considered to pack "forgotten" concept into it. I have no idea which will be better for future extension.
- Loading branch information
Showing
10 changed files
with
178 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.