From: Stas Sergeev <stsp@list.ru>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git mailing list <git@vger.kernel.org>
Subject: Re: git gc seems to break --symbolic-full-name
Date: Sun, 23 Jul 2017 22:23:28 +0300 [thread overview]
Message-ID: <ed1ddfec-5782-d14b-6717-a1532efc0138@list.ru> (raw)
In-Reply-To: <CA+P7+xrhLf9eS_KkxTmWZgQ+Ho8VN83GS-OvxmboZ=_iY4dY0g@mail.gmail.com>
23.07.2017 11:40, Jacob Keller пишет:
> On Fri, Jul 21, 2017 at 12:03 PM, Stas Sergeev <stsp@list.ru> wrote:
>> 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.
> There's no real way to do this, and even prior to 2007 when the file
> always existed, there's no guarantee it's modification time is valid.
>
> I'd suggest you have a phony rule which you always run, that checks
> the ref, and sees if it's different from "last time" and then updates
> a different file if that's the case. Then the build can depend on the
> generated file, and you'd be able to figure it out.
OK, thanks, that looks quite simple too.
I will have to create the file by hands that
I expected git to already have, but it appears
not.
> What's the real goal for depending on when the ref changes?
So that when users fill in the bug report, I can
see at what revision have the bug happened. :)
While seemingly "just a debugging sugar", the
hard experience shows this to be exceptionally
useful.
I think even linux kernel does something like
this, and solves that task the hard way. For
example I can see a script at scripts/setlocalversion
whose output seems to go to
include/config/kernel.release and a lot of
logic in the toplevel makefile about this.
So not liking the fact that every project solves
this differently, I was trying to get the solution
directly from git. But I'll try otherwise.
next prev parent reply other threads:[~2017-07-23 19:29 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
2017-07-23 8:40 ` Jacob Keller
2017-07-23 19:23 ` Stas Sergeev [this message]
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=ed1ddfec-5782-d14b-6717-a1532efc0138@list.ru \
--to=stsp@list.ru \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.keller@gmail.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