git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git gc seems to break --symbolic-full-name

From
SSStas 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.

Previous: Jacob KellerNext: Jeff King
Message 10 of 12 in “git gc seems to break --symbolic-full-name”
  1. Stas SergeevJul 21, 2017
  2. Junio C HamanoJul 21, 2017
  3. Stas SergeevJul 21, 2017
  4. Jacob KellerJul 23, 2017
  5. Stas SergeevJul 23, 2017
  6. Jacob KellerJul 24, 2017
  7. Stas SergeevJul 24, 2017
  8. Stas SergeevJul 26, 2017
  9. Jacob KellerJul 26, 2017
  10. Stas SergeevJul 26, 2017
  11. Jeff KingJul 26, 2017
  12. Stas SergeevJul 26, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.