summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e72c740)
raw | patch | inline | side by side (parent: e72c740)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 4 Mar 2008 08:25:06 +0000 (00:25 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Mar 2008 18:52:56 +0000 (10:52 -0800) |
The new option --rebasing is used internally for rebase to tell am that
it is being used for its purpose. This would leave .dotest/rebasing to
help "completion" scripts tell if the ongoing operation is am or rebase.
Also the option at the same time stands for --binary, -3 and -k which
are always given when rebase drives am as its backend.
Using the information "am" leaves, git-completion.bash tells ongoing
rebase and am apart.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
it is being used for its purpose. This would leave .dotest/rebasing to
help "completion" scripts tell if the ongoing operation is am or rebase.
Also the option at the same time stands for --binary, -3 and -k which
are always given when rebase drives am as its backend.
Using the information "am" leaves, git-completion.bash tells ongoing
rebase and am apart.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash | patch | blob | history | |
git-am.sh | patch | blob | history | |
git-rebase.sh | patch | blob | history |
index 8f70e1efc11553ce2360fab8693e2749a3fc36b4..5ae87998e6cc434ee5de8413426429fd891b0ac1 100755 (executable)
local b
if [ -d "$g/../.dotest" ]
then
- r="|AM/REBASE"
+ if test -f "$g/../.dotest/rebasing"
+ then
+ r="|REBASE"
+ elif test -f "$g/../.dotest/applying"
+ then
+ r="|AM"
+ else
+ r="|AM/REBASE"
+ fi
b="$(git symbolic-ref HEAD 2>/dev/null)"
elif [ -f "$g/.dotest-merge/interactive" ]
then
diff --git a/git-am.sh b/git-am.sh
index 18468769c1e247cec97b330f0dbfe15e486411c8..1f6b5e02c5e7da45a8e7966b600946cff9c24832 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
p= pass it through git-apply
resolvemsg= override error message when patch failure occurs
r,resolved to be used after a patch failure
-skip skip the current patch"
+skip skip the current patch
+rebasing (internal use for git-rebase)"
. git-sh-setup
prefix=$(git rev-parse --show-prefix)
prec=4
dotest=".dotest"
-sign= utf8=t keep= skip= interactive= resolved= binary=
+sign= utf8=t keep= skip= interactive= resolved= binary= rebasing=
resolvemsg= resume=
git_apply_opt=
resolved=t ;;
--skip)
skip=t ;;
+ --rebasing)
+ rebasing=t threeway=t keep=t binary=t ;;
-d|--dotest)
die "-d option is no longer supported. Do not use."
;;
echo "$utf8" >"$dotest/utf8"
echo "$keep" >"$dotest/keep"
echo 1 >"$dotest/next"
+ if test -n "$rebasing"
+ then
+ : >"$dotest/rebasing"
+ else
+ : >"$dotest/applying"
+ fi
fi
case "$resolved" in
diff --git a/git-rebase.sh b/git-rebase.sh
index 6b9af962a9cee734510518e82cf2537441ed843a..452c5e7e01e168ec4fcdc5bb87caac3f326f95ea 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
if test -z "$do_merge"
then
git format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD |
- git am $git_am_opt --binary -3 -k --resolvemsg="$RESOLVEMSG" &&
+ git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
move_to_original_branch
ret=$?
test 0 != $ret -a -d .dotest &&