Hi! > >Also dep12-migrate performs the actual migration, while > >dep-14-convert-git-branch-names.sh only suggests what should be done.
Running dep-14-convert-git-branch-names will print a list of commands to run, which you easily can just copy-paste to run. The script also has option `--apply` to run those commands automatically, but it hasn't been enabled yet as we don't have enough users and confidence that all corner cases are covered. > What's still missing is a solution for locally checked out clones on > Other People's Laptops, as git will blow up if the remote changes > from "upstream" to "upstream/latest" and they git-pull/gbp-pull/mr-up … > > Guido thankfully started to work on this during DebCamp, with the > idea of enhancing gbp-pull to catch this specific error and fix the > branch: > https://salsa.debian.org/agx/git-buildpackage/-/merge_requests/53 > I suppose tests and other help would be appreciated here. So what exactly happens if a collaborator already has a git clone of a repository and the maintainer renames upstream -> upstream/latest? When the collaborator runs either `gbp pull` or `git pull` it will print out something like 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' To fix this, 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 Seems that latest git 2.51+ (now in unstable) detects this situation and does the reference rename automatically on the fly, but for Bookworm and Trixie collaborators unfortunately need to run `git branch -m upstream upstream/latest` once. If you mention this in the git commit message that updated gbp.conf, they might see it. Further improvements to dep-14-convert-git-branch-names and other tools like `mr up` are welcome if you are doing these conversions and find rough scenarios that need more automation and have an idea how to do it. The biggest contribution would of couse be if someone could help Guido and take on Bug#829444 so that git-buildpackage by default on *new* repositories would use DEP-14. If we don't have that, these "migrations" will keep on going forever.