-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git: on import_refs(), don't abandon ancestors of newly fetched refs
I made import_refs() not preserve commits referenced by remote branches at 520f692 "git: on import_refs(), don't preserve old branches referenced by remote refs." The idea is that remote branches are weak, and commits referenced by these refs can be freely rewritten by future local changes without moving the refs. I don't think that's wrong, but 520f692 also made "new" remote changes be abandoned by old remote refs. This problem occurs only when git.auto-local-branch is off. I think there are two ways to fix the problem: a. pin non-tracking remote branches just like local refs b. pin newly fetched refs in addition to local refs This patch implements (b) because it's simpler and more obvious that the fetched commits would never be abandoned immediately.
- Loading branch information
Showing
2 changed files
with
58 additions
and
1 deletion.
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