mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Don't delete the branch config when switching branches.
The fix for issue #46 in 5d016502eb
appears to break syncing in some
situations: the branch is deleted after the point where it's been
configured, which deletes part of its configuration and causes the
config to change each time you call `repo init`, alternating between a
configuration that works and one that doesn't.
Instead of deleting the branch with git branch -D, use git update-ref -d
which just deletes the ref (to avoid the rebase) without touching the
configuration for the branch that was set up during the first repo init.
This appears to ensure the config is left in a valid state all the time
no matter what combination of repo init commands you run, without
reintroducing the rebasing issue.
Change-Id: Iaadaa6e56a46840bbc593fa5b35cb5b34cd3ce69
This commit is contained in:
parent
87636f2ac2
commit
e8f75fa368
@ -2181,7 +2181,7 @@ class MetaProject(Project):
|
||||
syncbuf.Finish()
|
||||
|
||||
return GitCommand(self,
|
||||
['branch', '-D', 'default'],
|
||||
['update-ref', '-d', 'refs/heads/default'],
|
||||
capture_stdout = True,
|
||||
capture_stderr = True).Wait() == 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user