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

Re: git stash destroys hard links

From
Junio C Hamano <gitster@pobox.com>
Date
May 22, 2012, 17:41 UTC
Message-ID
<7v62bo5d0z.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAAXzdLWadNg9d_i8fZTawaxYm3ytcGCT4pzeth=LxrQYEO-3ww@mail.gmail.com>
Steven Penny <svnpenn@gmail.com> writes:
> I dont know if this is even fixable, but I wanted to at least mention it.

I do not think there is anything specific to stash. Whenever we write out results of an operation to a file in the working tree, we first unlink(2) and then creat(2), which essentially breaks hardlinked files and avoids updating some _other_ paths that share the underlying file with the updated path.

Previous: Steven PennyNext: Angus Hammond
Message 2 of 3 in “git stash destroys hard links”
  1. Steven PennyMay 22, 2012
  2. Junio C HamanoMay 22, 2012
  3. Angus HammondMay 22, 2012

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.