Skip to content

Commit

Permalink
git am: Set cmdline globally
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ramkumar Ramachandra authored and Junio C Hamano committed Jun 2, 2010
1 parent 225c93a commit d2c4631
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
}
Expand All @@ -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\"."
Expand Down

0 comments on commit d2c4631

Please sign in to comment.