From: Junio C Hamano Date: Tue, 18 Dec 2007 20:07:48 GMT Subject: Re: [PATCH] Add format-patch option --no-name-prefix. Message-ID: <7vk5nbzrzf.fsf@gitster.siamese.dyndns.org> In-Reply-To: Linus Torvalds writes: > On Tue, 18 Dec 2007, Pascal Obry wrote: > >> Johannes Sixt a écrit : >> > that we need another diff option for it. Ok, on my keyboard 0 is typed >> > with the right hand, and 1 with the left hand, but... ?? >> >> Because you just did not read my follow-up message :) >> >> I need this has I do not have the way to change the server applying the >> patch. So nothing wrong with my hands or fingers :) > .... > So I think you'd need separate arguments for the from/to prefixes, and not > try to shoehorn it into one argument. With possibly some simple form to > say "no prefix". So maybe something like > > --src-prefix= // default "a/" > --dst-prefix= // default "b/" > --no-prefix // shorthand for --src-prefix="" --dst-prefix="" > > would work for everybody? One worry I have is that "diff --git" is validated more strictly than other diffs by "git-apply", and patches generated with arbitrary prefix would break it. It might make sense to drop " --git" from the patch header if we allow a/ and b/ to be changed inconsistently.