On Fri, Jul 21, 2017 at 12:03 PM, Stas Sergeev <s...@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.

What's the real goal for depending on when the ref changes?

Thanks,
Jake

Reply via email to