Merge branch 'rt/rebase-i-shorten-stop-report'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)
The commit object name reported when "rebase -i" stops has been
shortened.

* rt/rebase-i-shorten-stop-report:
rebase-i: print an abbreviated hash when stop for editing

1  2 
git-rebase--interactive.sh
index 4cde685b43a4463bac5f96bcb4f8ed8b3e9347be,e98866e2a8cc0052f9b6d5a6a7290d46c7a28e45..9ea30756f13349c96784f0091da4c3c667166485
@@@ -81,13 -81,17 +81,13 @@@ rewritten_pending="$state_dir"/rewritte
  # and leaves CR at the end instead.
  cr=$(printf "\015")
  
 -strategy_args=
 -if test -n "$do_merge"
 -then
 -      strategy_args=${strategy:+--strategy=$strategy}
 -      eval '
 -              for strategy_opt in '"$strategy_opts"'
 -              do
 -                      strategy_args="$strategy_args -X$(git rev-parse --sq-quote "${strategy_opt#--}")"
 -              done
 -      '
 -fi
 +strategy_args=${strategy:+--strategy=$strategy}
 +eval '
 +      for strategy_opt in '"$strategy_opts"'
 +      do
 +              strategy_args="$strategy_args -X$(git rev-parse --sq-quote "${strategy_opt#--}")"
 +      done
 +'
  
  GIT_CHERRY_PICK_HELP="$resolvemsg"
  export GIT_CHERRY_PICK_HELP
@@@ -548,7 -552,8 +548,8 @@@ do_next () 
  
                mark_action_done
                do_pick $sha1 "$rest"
-               warn "Stopped at $sha1... $rest"
+               sha1_abbrev=$(git rev-parse --short $sha1)
+               warn "Stopped at $sha1_abbrev... $rest"
                exit_with_patch $sha1 0
                ;;
        squash|s|fixup|f)
@@@ -1233,8 -1238,7 +1234,8 @@@ the
        git rev-list $revisions |
        while read rev
        do
 -              if test -f "$rewritten"/$rev && test "$(sane_grep "$rev" "$state_dir"/not-cherry-picks)" = ""
 +              if test -f "$rewritten"/$rev &&
 +                 ! sane_grep "$rev" "$state_dir"/not-cherry-picks >/dev/null
                then
                        # Use -f2 because if rev-list is telling us this commit is
                        # not worthwhile, we don't want to track its multiple heads,