git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "git gc" removes ".git/refs/heads/master".
@ 2009-01-29 19:31 Bernd Lommerzheim
  2009-01-29 19:50 ` Johannes Schindelin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bernd Lommerzheim @ 2009-01-29 19:31 UTC (permalink / raw)
  To: git

Hi,

maybe I found a bug in git. When I execute "git gc" in my local repository,
git removes the file ".git/refs/heads/master". Is this an intended behavior
(but why?) or is that a bug?

Some commands to reproduce:
~ $ mkdir tmp; cd tmp
~/tmp $ git init
Initialized empty Git repository in /home/myuser/tmp/.git/
~/tmp $ echo "content" > a
~/tmp $ git add .
~/tmp $ git commit -a -m "first commit"
Created initial commit 0b67f33: first commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 a
~/tmp $ cat .git/refs/heads/master
0b67f33fff4152a912fdbe8819480b8fc1f2e990
~/tmp $ git gc
Counting objects: 3, done.
Writing objects: 100% (3/3), done.
Total 3 (delta 0), reused 0 (delta 0)
~/tmp $ cat .git/refs/heads/master
cat: .git/refs/heads/master: No such file or directory
~/tmp $ cat .git/HEAD
ref: refs/heads/master
~/tmp $ 

I tested this with git v1.6.0.6, v1.6.1.1 and the current master
(a34a9dbb..).


Best regards,

Bernd Lommerzheim

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

end of thread, other threads:[~2009-01-29 20:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 19:31 "git gc" removes ".git/refs/heads/master" Bernd Lommerzheim
2009-01-29 19:50 ` Johannes Schindelin
2009-01-29 19:51 ` Johannes Gilger
2009-01-29 19:55 ` Peter Baumann
2009-01-29 20:07 ` Junio C Hamano

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).