aboutsummaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2010-06-02 10:33:35 +0200
committerJunio C Hamano <gitster@pobox.com>2010-06-02 09:51:39 -0700
commitd2c46310618ab0fefe4641b5a0d71899c918bf47 (patch)
tree94af0228a6fa078ed637fd441b88242e7e7be730 /git-am.sh
parent225c93a3cac93e8c619e5c8af47d2a781eedcacd (diff)
downloadgit-d2c46310618ab0fefe4641b5a0d71899c918bf47.tar.gz
git-d2c46310618ab0fefe4641b5a0d71899c918bf47.tar.xz
git am: Set cmdline globally
Set the $cmdline variable globally, and not in stop_here_user_resolve so it can be used in other code fragments as well. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/git-am.sh b/git-am.sh
index 87ffae252..83a0df035 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -52,6 +52,16 @@ else
HAS_HEAD=
fi
+cmdline="git am"
+if test '' != "$interactive"
+then
+ cmdline="$cmdline -i"
+fi
+if test '' != "$threeway"
+then
+ cmdline="$cmdline -3"
+fi
+
sq () {
git rev-parse --sq-quote "$@"
}
@@ -66,15 +76,6 @@ stop_here_user_resolve () {
printf '%s\n' "$resolvemsg"
stop_here $1
fi
- cmdline="git am"
- if test '' != "$interactive"
- then
- cmdline="$cmdline -i"
- fi
- if test '' != "$threeway"
- then
- cmdline="$cmdline -3"
- fi
echo "When you have resolved this problem run \"$cmdline --resolved\"."
echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
echo "To restore the original branch and stop patching run \"$cmdline --abort\"."