git +edit default branch is set to "refs/heads/master" even if this branch doesn't exist

Bug #1897914 reported by Iain Lane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

I just pushed a branch called "growroot-udevadm-trigger" to lp:~laney/+git/cloud-initramfs-tools. I then wanted to move this repository to my fork of the upstream cloud-initramfs-tools project in Launchpad.

I visted https://code.launchpad.net/%7Elaney/+git/cloud-initramfs-tools/+edit to do this, and changed the radio to specify this project. After submitting the form I was returned to the same +edit page with "There is 1 error." and this error was "This repository does not contain a reference named 'refs/heads/master'."

Changing this to refs/heads/growroot-udevadm-trigger let me submit the form, but I think Launchpad could have worked this out on its own. Something like: if there's no "master" (or main or whatever if there's a future renaming of this default) branch then pick another one.

In the case like mine where there's only one branch pushed this will be the right one, otherwise I can see that it's difficult to divine what the user would want here.

Tags: git
Tom Wardill (twom)
Changed in launchpad:
importance: Undecided → Low
status: New → Triaged
tags: added: git
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.