summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 431b7e7)
raw | patch | inline | side by side (parent: 431b7e7)
author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | |
Sun, 6 Feb 2011 18:43:51 +0000 (13:43 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 10 Feb 2011 22:08:09 +0000 (14:08 -0800) |
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>
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>
git-rebase--interactive.sh | patch | blob | history | |
git-rebase.sh | patch | blob | history |
index fa8bfda7653345f92e6a0d6fd689bf174081ec67..affa467a63ca5131d0c60cc3e5a352be5aec57b3 100755 (executable)
printf '%s\n' "$*" >&2
}
-output () {
- case "$verbose" in
- '')
- output=$("$@" 2>&1 )
- status=$?
- test $status != 0 && printf "%s\n" "$output"
- return $status
- ;;
- *)
- "$@"
- ;;
- esac
-}
-
# Output the commit message for the specified commit.
commit_message () {
git cat-file commit "$1" | sed "1,/^$/d"
diff --git a/git-rebase.sh b/git-rebase.sh
index c60221b5a4f4d57237af6dfc77f303107bc1491b..42d635bc298edd74bcd2100b1115195a74b3f115 100755 (executable)
--- a/git-rebase.sh
+++ b/git-rebase.sh
GIT_QUIET=$(cat "$state_dir"/quiet)
}
+output () {
+ case "$verbose" in
+ '')
+ output=$("$@" 2>&1 )
+ status=$?
+ test $status != 0 && printf "%s\n" "$output"
+ return $status
+ ;;
+ *)
+ "$@"
+ ;;
+ esac
+}
+
move_to_original_branch () {
case "$head_name" in
refs/*)
run_specific_rebase
;;
skip)
- git reset --hard HEAD || exit $?
+ output git reset --hard HEAD || exit $?
read_basic_state
run_specific_rebase
;;
die "Could not move back to $head_name"
;;
esac
- git reset --hard $orig_head
+ output git reset --hard $orig_head
rm -r "$state_dir"
exit
;;