Re: [PATCH] stash: disable renames when calling git-diff
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 6, 2016, 19:51 UTC
- Message-ID
- <xmqqd1h425vv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20161206193154.vf7cd7lk5gyxrra5@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 21 quoted lines
> On Tue, Dec 06, 2016 at 11:20:18AM -0800, Junio C Hamano wrote: > >> Jeff King <peff@peff.net> writes: >> >> >> If you run: >> >> >> >> git -c diff.renames=false stash >> >> >> >> then it works. >> > >> > And here's a patch to fix it. >> >> Yuck. This obviously has easier to bite more people since we >> enabled the renames by default. Thanks for a quick fix. >> >> I wonder why we are using "git diff" here, not the plumbing, >> though. > > 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".
> Though I'm not sure that "git add -u" would not accomplish the same > thing as these several commands.
Yeah, it looks like "add -u" to me, too. Perhaps the script was old enough that it didn't exist back then? I dunno.