@matheusbsbs / matheus-bagliano / commits / 4974c2caa2
Fork 0

rebase: make -v a tiny bit more verbose

To make it possible to later remove the handling of --abort from git-rebase--interactive.sh, align the implementation in git-rebase.sh with the former by making it a bit more verbose. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Martin von Zweigbergk committed Feb 6, 2011 at 13:43 UTC 4974c2caa215a78dd0c6e3665e23e029d98cbbeb
2 files changed +16 -16
git-rebase--interactive.sh
-14
@@ -86,20 +86,6 @@ warn () {
86 printf '%s\n' "$*" >&2
87 }
88
89 -output () {
90 - case "$verbose" in
91 - '')
92 - output=$("$@" 2>&1 )
93 - status=$?
94 - test $status != 0 && printf "%s\n" "$output"
95 - return $status
96 - ;;
97 - *)
98 - "$@"
99 - ;;
100 - esac
101 -}
102 -
89 # Output the commit message for the specified commit.
90 commit_message () {
91 git cat-file commit "$1" | sed "1,/^$/d"
git-rebase.sh
+16 -2
@@ -74,6 +74,20 @@ read_basic_state () {
74 GIT_QUIET=$(cat "$state_dir"/quiet)
75 }
76
77 +output () {
78 + case "$verbose" in
79 + '')
80 + output=$("$@" 2>&1 )
81 + status=$?
82 + test $status != 0 && printf "%s\n" "$output"
83 + return $status
84 + ;;
85 + *)
86 + "$@"
87 + ;;
88 + esac
89 +}
90 +
91 move_to_original_branch () {
92 case "$head_name" in
93 refs/*)
@@ -263,7 +277,7 @@ continue)
277 run_specific_rebase
278 ;;
279 skip)
266 - git reset --hard HEAD || exit $?
280 + output git reset --hard HEAD || exit $?
281 read_basic_state
282 run_specific_rebase
283 ;;
@@ -276,7 +290,7 @@ abort)
290 die "Could not move back to $head_name"
291 ;;
292 esac
279 - git reset --hard $orig_head
293 + output git reset --hard $orig_head
294 rm -r "$state_dir"
295 exit
296 ;;