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

Re: git stash deletes/drops changes of

From
Junio C Hamano <gitster@pobox.com>
Date
May 23, 2013, 22:49 UTC
Message-ID
<7vd2shcnx7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87sj1d5ous.fsf@linux-k42r.v.cablecom.net>
Thomas Rast <trast@inf.ethz.ch> writes:
Show 10 quoted lines
> So maybe it would be time to first make up our minds as to what
> --assume-unchanged should actually mean:
>
> * Ignore changes to a tracked file, but treat them as valuable.  In
>   this case we'd have to make sure that failures like git-stash's are
>   handled properly.
>
> * Ignore changes to a tracked file, as in "who cares if it was changed".
>
> * A very specific optimization for users who know what they are doing.

It has always been a promise the user makes to Git that the working tree files that are marked as such will be kept identical to what is in the index (hence there is no need for Git to check if they were modified). And by extension, Git is now free to choose reading from the working tree file when asked to read from blob object recorded in the index for that path, or vice versa, because of that promise.

It is not --ignore-changes bit, and has never been. What are the workflows that are helped if we had such a bit? If we need to support them, I think you need a real --ignore-changes bit, not an abuse of --assume-unchanged.

Previous: Thomas RastNext: Thomas Rast
Message 4 of 20 in “git stash deletes/drops changes of "assume-unchanged" files”
  1. Adeodato SimóJun 4, 2010
  2. Jim GreenleafMay 23, 2013
  3. Thomas RastMay 23, 2013
  4. Junio C HamanoMay 23, 2013
  5. Thomas RastMay 23, 2013
  6. Junio C HamanoMay 23, 2013
  7. Phil HordMay 24, 2013
  8. Jim GreenleafMay 24, 2013
  9. John KeepingMay 24, 2013
  10. Jim GreenleafMay 24, 2013
  11. John KeepingMay 24, 2013
  12. Petr BaudisMay 23, 2013
  13. John KeepingMay 24, 2013
  14. Petr BaudisMay 24, 2013
  15. John KeepingMay 24, 2013
  16. Petr BaudisMay 24, 2013
  17. John KeepingMay 24, 2013
  18. Petr BaudisMay 24, 2013
  19. John KeepingMay 24, 2013
  20. Stephen BashMay 24, 2013

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.