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

Re: [PATCH] stash: disable renames when calling git-diff

From
Jeff King <peff@peff.net>
Date
Dec 6, 2016, 20:11 UTC
Message-ID
<20161206201130.azfmqvtk3iettlx7@sigill.intra.peff.net>
In-Reply-To
<xmqqd1h425vv.fsf@gitster.mtv.corp.google.com>
On Tue, Dec 06, 2016 at 11:51:16AM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> > I don't think there's a plumbing command which works for diffing the
> > working tree directly to a git tree. In the long run, it might be a good
> > idea to remedy that.
> 
> I do not think that one is doing anything different from "git
> diff-index --name-only -z HEAD".
> [...]
> Yeah, it looks like "add -u" to me, too.  Perhaps the script was old
> enough that it didn't exist back then?  I dunno.

Hmm, nope. It _was_ "git add -u" at one point and switched. See 7aa5d43cc (stash: Don't overwrite files that have gone from the index, 2010-04-18).

I think you are right that diff-index could work, though. I always forget that without "--cached", diff-index looks at the working tree files.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 13 in “Bug: stash staged file move loses original file deletion”
  1. Matthew PateyDec 5, 2016
  2. Jeff KingDec 6, 2016
  3. Jeff KingDec 6, 2016
  4. stash: disable renames when calling git-diffJeff King, Dec 6, 2016
  5. Junio C HamanoDec 6, 2016
  6. Jeff KingDec 6, 2016
  7. Junio C HamanoDec 6, 2016
  8. Jeff KingDec 6, 2016
  9. Junio C HamanoDec 6, 2016
  10. Jeff KingDec 6, 2016
  11. Junio C HamanoDec 6, 2016
  12. Jeff KingDec 6, 2016
  13. Junio C HamanoDec 6, 2016

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.