rebase -i: Inline expression
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 14 Jan 2010 05:54:42 +0000 (06:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Jan 2010 08:27:56 +0000 (00:27 -0800)
Inline expression when generating output rather than overwriting the
"sha1" local variable with a short SHA1.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-rebase--interactive.sh

index aae94d2f6f3b883ffffc4fc453e97dea151c9f80..6fd3105b54de73ab43744074eb20a2f907e0a0c2 100755 (executable)
@@ -167,8 +167,7 @@ pick_one () {
        if test -z "$no_ff" -a "$current_sha1" = "$parent_sha1"
        then
                output git reset --hard $sha1
-               sha1=$(git rev-parse --short $sha1)
-               output warn Fast-forward to $sha1
+               output warn Fast-forward to $(git rev-parse --short $sha1)
        else
                output git cherry-pick "$@"
        fi