Skip to content

Commit d2c4631

Browse files
artagnongitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 225c93a commit d2c4631

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

git-am.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ else
5252
HAS_HEAD=
5353
fi
5454

55+
cmdline="git am"
56+
if test '' != "$interactive"
57+
then
58+
cmdline="$cmdline -i"
59+
fi
60+
if test '' != "$threeway"
61+
then
62+
cmdline="$cmdline -3"
63+
fi
64+
5565
sq () {
5666
git rev-parse --sq-quote "$@"
5767
}
@@ -66,15 +76,6 @@ stop_here_user_resolve () {
6676
printf '%s\n' "$resolvemsg"
6777
stop_here $1
6878
fi
69-
cmdline="git am"
70-
if test '' != "$interactive"
71-
then
72-
cmdline="$cmdline -i"
73-
fi
74-
if test '' != "$threeway"
75-
then
76-
cmdline="$cmdline -3"
77-
fi
7879
echo "When you have resolved this problem run \"$cmdline --resolved\"."
7980
echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
8081
echo "To restore the original branch and stop patching run \"$cmdline --abort\"."

0 commit comments

Comments
 (0)