summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b2d4b24)
raw | patch | inline | side by side (parent: b2d4b24)
author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | |
Tue, 28 Dec 2010 09:30:39 +0000 (10:30 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 28 Dec 2010 23:05:24 +0000 (15:05 -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 eace4e53bc871f9f677b0c4d036e79573feb337f..acd02585643438b7ebb495a174f7b0b9dd217e23 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 615d9ddea37e460a435258ff7b362b4f3282c018..0322f27edf9443b32915f4fc3af561c6b2738425 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/*)
force_rebase action preserve_merges upstream switch_to head_name \
state_dir orig_head onto_name GIT_QUIET revisions RESOLVEMSG \
allow_rerere_autoupdate git_am_opt
- export -f move_to_original_branch
+ export -f move_to_original_branch output
exec git-rebase--$type
}
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
;;