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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 15 Jan 2008, Daniel Barkalow wrote:
> 
> I don't think --no-prefix is sufficient for submodules; it means that 
> git-apply will accidentally remove exactly one level, but if your 
> submodule is two directory levels down, it won't work, and having the 
> effective prefixes be "gitweb" and "gitweb" is a little hackish. You'd 
> really want to generate a -p1 patch whose root is shifted from the actual 
> project root, not a -p0 patch or -p2 patch or something.

.. and this is *exactly* what

	cd gitweb
	git diff --src-prefix=a/gitweb/ --dst-prefix=b/gitweb/ 

would do (obviously people wouldn't do this by hand - it would be 
something that is done by the "git diff" hitting a subproject).

The point is, Junio's patch suggestion tied that prefix together with the 
"gitness" of the patch, so Junio's patch would have broken the above: git 
would decide that since it's not a standard -p1 prefix, it's not a git 
diff, so it shouldn't have "--git" in it.

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.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux