Re: [PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 9, 2010, 18:35 UTC
- Message-ID
- <7vbp86n4t4.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1284019625-14096-1-git-send-email-ods15@ods15.dyndns.org>
Oded Shimon <ods15@ods15.dyndns.org> writes:
> For the case of "diff.noprefix" in git-config, git-format-patch should > still output diff with standard prefixes for git-am > > Signed-off-by: Oded Shimon <ods15@ods15.dyndns.org>
Hmm.
Show 12 quoted lines
> diff --git a/git-rebase.sh b/git-rebase.sh > index 7508463..e83a0cf 100755 > --- a/git-rebase.sh > +++ b/git-rebase.sh > @@ -565,7 +565,7 @@ fi > > if test -z "$do_merge" > then > - git format-patch -k --stdout --full-index --ignore-if-in-upstream \ > + git format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \ > --no-renames $root_flag "$revisions" | > git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
As the format-patch invocation is already multi-line, you probably would want to use a continuation line with "\" to keep the line length shorter.
We need to protect ourselves from crazy people, so regrettably something like this patch is unavoidable, albeit unsightly.
Thanks.