Subject: Re: [PATCH v2] Do not show "diff --git" metainfo with --no-prefix

From: Junio C Hamano <[email-masked]>
Date: Wed, 16 Jan 2008 16:57:20 -0800

Daniel Barkalow <[email-masked]> writes:

> On Wed, 16 Jan 2008, Junio C Hamano wrote:
>
>> Linus Torvalds <[email-masked]> writes:
>> 
>> > That's why tying "--git" together with any prefix handling is wrong: 
>> > because it's a totally different issue. It's true that "git-apply" right 
>> > now doesn't understand these things, but assuming we want to teach 
>> > git-apply to apply to subprojects eventually (we do, don't we?) we'll 
>> > eventually have to teach it.
>> 
>> That's all correct but
>> 
>>  * currently diff does not recurse, nor apply does not apply
>>    recursively;
>> 
>>  * "git diff" that comes with 1.5.4, if we do not do anything,
>>    can produce a diff that will be rejected by the stricter
>>    check "git apply" has when used with --no-prefix and friends;
>> 
>>  * submodule aware versions of "git diff" can be told to add
>>    "--mark-as-git-diff" when it passes "--src-prefix=a/git-gui"
>>    and "--dst-prefix=b/git-gui" when it recurses internally, to
>>    defeat what my proposed patch does.
>
> Or it could pass an option to include the intermediate portion as part of 
> the name rather than as part of the prefixes. And git-apply would probably 
> be a lot happier to have confirmation that certain files are supposed to 
> be from a submodule, which could be handled by including that option in 
> the header after --git.

Yeah, I guess we can solve it that way.  In either case that's a
future thing.

An important point for me in this discussion is to agree that
the current --no-prefix that claims to be "diff --git" is not
safe for release and come to consensus that we need a fix.