Re: git gc seems to break --symbolic-full-name
- From
- Stas Sergeev <stsp@list.ru>
- Date
- Jul 26, 2017, 08:40 UTC
- Message-ID
- <a6738cae-ad8d-cf51-0fbb-428cf0f88703@list.ru>
- In-Reply-To
- <CA+P7+xock9gpYVtxj2n6L5Y9dO1VV01OEOT5i0MR7ay68yS+WQ@mail.gmail.com>
26.07.2017 03:36, Jacob Keller пишет:
Show 8 quoted lines
> If your goal is to make it so users filling out bug reports have a > version, then using git descrsibe and making that be part of your > version (based off your tags, and commits) is how pretty much every > other project I've worked on does this. > > I really don't think that's your goal here, given you're doing things > in make with timestamps and builds, so I guess I misunderstood your > answer?
There are 2 different things: 1. put git describe output into some header file 2. make things to rebuild with every new commit
So I actually stuck at solving 2, because 1 is trivial. My original solution for 2 was to "depend" on refs/heads/*. This worked besides git gc, but had a lot of troubles with worktrees. And this time I switched to the "touch tmpfile" trick with the date taken from git log. This requires .LOW_RESOLUTION_TIME in makefile, so probably not the best solution again, but should hopefully be more future-proof than the previous one.