Git development
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp@list.ru>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: git gc seems to break --symbolic-full-name
Date: Fri, 21 Jul 2017 22:03:02 +0300	[thread overview]
Message-ID: <223fa7c7-196d-e4fe-85b5-7d7cc576aa52@list.ru> (raw)
In-Reply-To: <xmqqbmodhb5h.fsf@gitster.mtv.corp.google.com>

21.07.2017 21:56, Junio C Hamano пишет:
> Stas Sergeev <stsp@list.ru> writes:
>
>> 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 expected, and in the modern world (like, after year 2007),
> a refname "refs/heads/foo" does *not* mean that there is a file
> with such a path under .git/ directory.  "rev-parse" does not return
> any "path" in the filesystem sense.
>
> See "git pack-refs --help", and depending on what you want to learn
> about the ref in question, perhaps "git show-ref refs/heads/devel"
> is what you want.
I wanted some kind of file to use it as a
build dependency for the files that needs
to be re-built when the head changes.
This works very well besides git gc.
What other method can be used as simply
as that? git show-ref does not seem to be
giving this.

  reply	other threads:[~2017-07-21 19:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=223fa7c7-196d-e4fe-85b5-7d7cc576aa52@list.ru \
    --to=stsp@list.ru \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox