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, 14:08 UTC
Message-ID
<5b86f0e2-b44f-a3ea-bb66-c7826619773b@list.ru>
In-Reply-To
<20170726132322.4cfj73tynrko264o@sigill.intra.peff.net>
26.07.2017 16:23, Jeff King пишет:
Show 11 quoted lines
> In git.git we do something like:
>
> -- >8 --
> other: version
> 	cat $< >$@
>
> .PHONY: FORCE
> version: FORCE
> 	@git rev-parse HEAD >$@+
> 	@if cmp $@+ $@ >/dev/null 2>&1; then rm $@+; else mv $@+ $@; fi
> -- >8 --

Yes, thats a nice recipe that I would be using if not for the fact that I already switched to "touch", which requires 1 fewer tmp file and no comparison. But I'll keep this in mind if something wrong happens with my current solution, thanks! I wonder if git can provide some helper script for other projects to solve this in a same way.

Previous: Jeff King
Message 12 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.