Git development
 help / color / mirror / Atom feed
* git gc seems to break --symbolic-full-name
@ 2017-07-21 17:40 Stas Sergeev
  2017-07-21 18:56 ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Stas Sergeev @ 2017-07-21 17:40 UTC (permalink / raw)
  To: git

Hello.

I do the following:

$ git rev-parse --symbolic-full-name devel
refs/heads/devel
$ ls -l .git/`git rev-parse --symbolic-full-name devel`
-rw-rw-r-- 1 stas stas 41 июл 21 15:05 .git/refs/heads/devel

This is fine. But after git gc:

$ git rev-parse --symbolic-full-name devel
refs/heads/devel
$ LC_ALL=C ls -l .git/`git rev-parse --symbolic-full-name devel`
ls: cannot access '.git/refs/heads/devel': No such file or directory

This is because after git gc there is nothing in .git/refs/heads:

$ LC_ALL=C ls -l .git/refs/heads/
total 8
drwxrwxr-x 2 stas stas 4096 Jul 31  2013 feature
drwxrwxr-x 2 stas stas 4096 Dec 23  2016 pr

I prepend the path with .git above just as an
example: the same happens with rev-parse --git-path.

So I wonder if it is an expected behaviour for
--symbolic-full-name to return the invalid pathes?
If so, how can I get the path to the needed head file?
I use that for dependency tracking.

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

end of thread, other threads:[~2017-07-26 15:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-21 17:40 git gc seems to break --symbolic-full-name Stas Sergeev
2017-07-21 18:56 ` Junio C Hamano
2017-07-21 19:03   ` Stas Sergeev
2017-07-23  8:40     ` Jacob Keller
2017-07-23 19:23       ` Stas Sergeev
2017-07-24  4:02         ` Jacob Keller
2017-07-24 12:50           ` Stas Sergeev
2017-07-26  0:21           ` Stas Sergeev
2017-07-26  0:36         ` Jacob Keller
2017-07-26  8:40           ` Stas Sergeev
2017-07-26 13:23             ` Jeff King
2017-07-26 14:08               ` Stas Sergeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox