summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorMatt Kraai <kraai@ftbfs.org>2007-09-25 18:30:13 -0700
committerJunio C Hamano <gitster@pobox.com>2007-09-26 00:39:09 -0700
commit5166810b1e16b22e342f2181a3535e70c6e7a119 (patch)
tree68865d516bbd5e522a0f5a4552076f6ea0b24de8 /git-rebase--interactive.sh
parentae830ed7f50377e64b774ce87441ff4538f04ad7 (diff)
downloadgit-5166810b1e16b22e342f2181a3535e70c6e7a119.tar.gz
rebase -i: create .dotest-merge after validating options.
Creating .dotest-merge before validating the options prevents both --continue and --interactive from working if the options are invalid, so only create it after validating the options. [jc: however, just moving the creation of DOTEST breaks output] Signed-off-by: Matt Kraai <kraai@ftbfs.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index d751984f8e..268a629c43 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -36,10 +36,9 @@ warn () {
output () {
case "$VERBOSE" in
'')
- "$@" > "$DOTEST"/output 2>&1
+ output=$("$@" 2>&1 )
status=$?
- test $status != 0 &&
- cat "$DOTEST"/output
+ test $status != 0 && printf "%s\n" "$output"
return $status
;;
*)
@@ -428,7 +427,6 @@ do
require_clean_work_tree
- mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
if test ! -z "$2"
then
output git show-ref --verify --quiet "refs/heads/$2" ||
@@ -440,6 +438,8 @@ do
HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
+ mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
+
test -z "$ONTO" && ONTO=$UPSTREAM
: > "$DOTEST"/interactive || die "Could not mark as interactive"