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

Re: [PATCH 1/2] stash bug: stash can lose data in a file removed from the index

From
Charles Bailey <charles@hashpling.org>
Date
Apr 12, 2010, 21:44 UTC
Message-ID
<20100412214403.GA27958@hashpling.org>
In-Reply-To
<1270923241-14383-1-git-send-email-charles@hashpling.org>
On Sat, Apr 10, 2010 at 07:14:00PM +0100, Charles Bailey wrote:
Show 15 quoted lines
> If a file is removed from the index and then modified in the working
> tree then stash will discard the working tree file with no way to
> recover the changes.
> 
> This can might be done in one of a number of ways.
> 
> git rm file
> vi file              # edit a new version
> git stash
> 
> or with git mv
> 
> git mv file newfile
> vi file              # make a new file with the old name
> git stash

I just wanted to give this issue a bit more visibility. To me it would seem to be fairly important as it's a potential loss of user data with no easy recovery.

If I'm wrong about it, perhaps someone can put me right.
Thanks,
Charles.
Previous: Charles BaileyNext: Charles Bailey
Message 3 of 4 in “Strange case with stash”
  1. Khaled al HabacheApr 10, 2010
  2. 1/2 stash bug: stash can lose data in a file removed from the indexCharles Bailey, Apr 10, 2010
  3. Charles BaileyApr 12, 2010
  4. 2/2 stash: Don't overwrite files that have gone from the indexCharles Bailey, Apr 10, 2010

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.