Oded Shimon [off-list ref] 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 <redacted>
Hmm.
quoted hunk
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.
On Thu, Sep 09, 2010 at 11:35:19AM -0700, Junio C Hamano wrote:
Oded Shimon [off-list ref] writes:
quoted
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 <redacted>
Hmm.
Anything wrong?
quoted
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.
Will do.
We need to protect ourselves from crazy people, so regrettably something
like this patch is unavoidable, albeit unsightly.
I am one of those crazy people (hence noticing the bug). I constantly copy
paste the filenames from diffs in order to write them in command line,
with mouse double-click which grabs the entire path/filename...
- ods15
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 <redacted>
---
git-rebase.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-rebase.sh b/git-rebase.sh
index 7508463..3335cee 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -566,6 +566,7 @@ fi
if test -z "$do_merge"
then
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" &&
move_to_original_branch
--
1.6.4.4