@matheusbsbs / matheus-bagliano / commits / d2c4631061
Fork 0

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>

Ramkumar Ramachandra committed Jun 2, 2010 at 10:33 UTC d2c46310618ab0fefe4641b5a0d71899c918bf47
1 file changed +10 -9
git-am.sh
+10 -9
@@ -52,6 +52,16 @@ else
52 HAS_HEAD=
53 fi
54
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 +
65 sq () {
66 git rev-parse --sq-quote "$@"
67 }
@@ -66,15 +76,6 @@ stop_here_user_resolve () {
76 printf '%s\n' "$resolvemsg"
77 stop_here $1
78 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
79 echo "When you have resolved this problem run \"$cmdline --resolved\"."
80 echo "If you would prefer to skip this patch, instead run \"$cmdline --skip\"."
81 echo "To restore the original branch and stop patching run \"$cmdline --abort\"."