Re: [PATCH v2] Do not show "diff --git" metainfo with --no-prefix
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 16, 2008, 04:18 UTC
- Message-ID
- <7vy7aqs8r4.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <alpine.LFD.1.00.0801151902080.2806@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> We do not want to make it particularly easy for people to create > mind-bogglingly stupid diff output.
Although the discussion was triggered by that Tortoise thing, the RFC patch was not about helping that. That's a new feature asked long after we went into rc freeze, and I am not interested in discussing such a feature, especially when I am sick.
The only objective was to make sure that a patch that is not kosher in git-apply's eyes is not marked with "diff --git"; otherwise, its output will confuse git-apply. As --no-prefix will be a new feature in 1.5.4, we would be shipping with a known-to-be-bad new feature that is --no-prefix, unless we do something about it. Fixing that breakage was the sole motivation behind my patch.
I think a reasonable short-term solution might be to disable any git specific stuff (renames, rewrites, etc) when --no-prefix and its friends are used, along with the patch you are commenting on to remove " --git" from the header. That would at least make sure that the --no-prefix feature is safe.