git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Creating remote branch called HEAD corrupts remote clones
@ 2011-01-17 10:02 Stephen Kelly
  2011-01-20 11:14 ` Stephen Kelly
  2011-01-20 19:53 ` Junio C Hamano
  0 siblings, 2 replies; 40+ messages in thread
From: Stephen Kelly @ 2011-01-17 10:02 UTC (permalink / raw)
  To: kde-pim; +Cc: git


Hi,

On Friday we had an issue where a developer pushed a branch called HEAD to 
the remote server. The result was that other developers could not pull or 
push. I have not been able to reproduce the exact issue locally, but this 
script shows that the bob clone behaves oddly on each pull. That is a 
symptom we saw on Friday. However, bob is still able to push, which we were 
not able to. That point could be something to do with how the kde git 
infrastructure is configured.

mkdir remote
cd remote/
git init --bare
cd ../
git clone remote/ alice
cd alice/
echo test >> file
git add file
git commit -am w
git push origin master
echo test >> file
git commit -am w
git branch HEAD
git push origin HEAD
git push
cd ..
git clone remote bob
cd bob/
git pull --rebase
echo test >> file
git commit -am w
git push
git pull
git pull
git pull

There were also messages like this:

$ git pull
remote: Counting objects: 5, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From /home/kde-devel/dev/src/playground/git/tmp/remote
 + 1434cd2...dd30974 HEAD       -> origin/HEAD  (forced update)
error: Ref refs/remotes/origin/master is at 
dd3097498a6c1c5bc73ad1f2ff3b7969a6f6d059 but expected 
1434cd2bb9823d2d2b1548c75fdd4ff8b1feddc1
 ! 1434cd2..2fb560d  master     -> origin/master  (unable to update local 
ref)

The HEAD branch was created accidentally and the issue was resolved by doing 
a git push origin -f :refs/heads/HEAD. Again though, git push -f is not 
something all developers are allowed to do on the kde git infrastructure, so 
until that was done, the repo was corrupt for everyone.

Shouldn't git forbit the creation of a branch called HEAD? Hopefully the 
provided script can lead to the actual issue that caused the corruption of 
our repo.

Thanks,

Steve.


_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2011-05-09 22:10 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-17 10:02 Creating remote branch called HEAD corrupts remote clones Stephen Kelly
2011-01-20 11:14 ` Stephen Kelly
2011-01-20 13:03   ` Thomas Rast
2011-01-20 15:05     ` Stephen Kelly
2011-01-20 15:41       ` Erik Faye-Lund
2011-01-20 16:00         ` Stephen Kelly
2011-01-20 17:32   ` Felipe Contreras
2011-01-20 19:21     ` Wesley J. Landaker
2011-01-20 19:53 ` Junio C Hamano
2011-01-20 20:38   ` Jeff King
2011-01-20 21:43     ` Junio C Hamano
2011-01-20 21:54       ` Jeff King
2011-01-20 23:52         ` Felipe Contreras
2011-01-21 17:37           ` Junio C Hamano
2011-01-22 12:46             ` Felipe Contreras
2011-02-20 13:17               ` Stephen Kelly
2011-04-26 12:09                 ` Stephen Kelly
2011-04-26 18:18                   ` Felipe Contreras
2011-04-27  9:18                     ` Stephen Kelly
2011-04-27  9:48                       ` Felipe Contreras
2011-04-27 11:29                         ` Stephen Kelly
2011-04-27 11:32                           ` Felipe Contreras
2011-04-27 11:37                             ` Stephen Kelly
2011-04-27 12:26                               ` Felipe Contreras
2011-04-27 12:21                           ` Erik Faye-Lund
2011-04-27 12:49                             ` Erik Faye-Lund
2011-05-02 19:26                               ` Stephen Kelly
2011-05-02 19:43                                 ` Erik Faye-Lund
2011-05-03 17:54                                   ` Felipe Contreras
2011-05-03 18:08                                     ` Stephen Kelly
2011-05-03 19:20                                       ` Felipe Contreras
2011-05-04 12:35                                     ` Erik Faye-Lund
2011-05-09  7:51                                       ` [PATCH] only warn about ambiguous refs if stderr is a tty Erik Faye-Lund
2011-05-09  8:03                                         ` Jeff King
2011-05-09  8:41                                           ` Erik Faye-Lund
2011-05-09 10:32                                             ` Jeff King
2011-05-09 12:37                                               ` Erik Faye-Lund
2011-05-09 12:49                                                 ` Jeff King
2011-05-09 16:33                                                   ` Junio C Hamano
2011-05-09 22:09                                                     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).