From: Junio C Hamano <gitster@pobox.com>
To: Bernd Lommerzheim <bernd@lommerzheim.com>
Cc: <git@vger.kernel.org>
Subject: Re: "git gc" removes ".git/refs/heads/master".
Date: Thu, 29 Jan 2009 12:07:05 -0800 [thread overview]
Message-ID: <7vy6wtev12.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <83c97f59a5a5e59f908f3fc125d26adb@lunox.net> (Bernd Lommerzheim's message of "Thu, 29 Jan 2009 20:31:17 +0100")
Bernd Lommerzheim <bernd@lommerzheim.com> writes:
> 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 $
$ grep master .git/packed-refs
prev parent reply other threads:[~2009-01-29 20:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vy6wtev12.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bernd@lommerzheim.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.