Re: "git gc" removes ".git/refs/heads/master".

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bernd Lommerzheim <bernd@xxxxxxxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux