After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782433 - Disallow branches named HEAD
Disallow branches named HEAD
Status: RESOLVED FIXED
Product: sysadmin
Classification: Infrastructure
Component: Git
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2017-05-10 11:48 UTC by Krzesimir Nowak
Modified: 2017-05-12 07:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bans HEAD branches (770 bytes, patch)
2017-05-10 11:48 UTC, Krzesimir Nowak
none Details | Review

Description Krzesimir Nowak 2017-05-10 11:48:13 UTC
Created attachment 351537 [details] [review]
Bans HEAD branches

I pushed by mistake a branch named recently with `git push origin master:HEAD` (instead of `git push origin HEAD:master`). It should not be allowed (we already ban tags with that name).

Patch attached, should do the trick, though is rather hard to test.
Comment 1 Krzesimir Nowak 2017-05-10 11:56:07 UTC
I tested it with:

 ./pre-receive-check-policy 000 123 refs/heads/HEAD