Hi, On Mon, Aug 11, 2025 at 01:46:16PM -0700, Otto Kekäläinen wrote: > Hi, > > This came up a couple of times in DebConf and nobody has the exact > answer on their mind, so documenting it here now: > > What happens if I have a git clone of a repository and the maintainer > renames upstream -> upstream/latest? > > There is a conflict in reference paths and I will get this: > > ± gbp pull --track-missing xxx > gbp:info: Fetching from 'xxx' > gbp:error: Error running git branch: fatal: cannot lock ref > 'refs/heads/upstream/latest': 'refs/heads/upstream' exists; cannot > create 'refs/heads/upstream/latest' > > This is however very easy to fix, I just run: > ± git branch -m upstream upstream/latest > > And then the pull works just fine: > ± gbp pull --track-missing xxx > gbp:info: Fetching from 'xxx' > gbp:info: Branch 'debian/latest' is already up to date. > gbp:info: Branch 'pristine-tar' is already up to date. > gbp:info: Updating 'upstream/latest': 659ac917b0c2..fc794704e2cd > > As this is a common scenario, maybe git-buildpackage could try to > handle it automatically?
See https://salsa.debian.org/agx/git-buildpackage/-/merge_requests/53 and the comments there: git 2.50 handles this gracefully. -- Guido > > - Otto > _______________________________________________ > git-buildpackage mailing list > [email protected] > http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage _______________________________________________ git-buildpackage mailing list [email protected] http://lists.sigxcpu.org/mailman/listinfo/git-buildpackage
