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>
This commit is contained in:
parent
ae830ed7f5
commit
5166810b1e
@ -36,10 +36,9 @@ warn () {
|
|||||||
output () {
|
output () {
|
||||||
case "$VERBOSE" in
|
case "$VERBOSE" in
|
||||||
'')
|
'')
|
||||||
"$@" > "$DOTEST"/output 2>&1
|
output=$("$@" 2>&1 )
|
||||||
status=$?
|
status=$?
|
||||||
test $status != 0 &&
|
test $status != 0 && printf "%s\n" "$output"
|
||||||
cat "$DOTEST"/output
|
|
||||||
return $status
|
return $status
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -428,7 +427,6 @@ do
|
|||||||
|
|
||||||
require_clean_work_tree
|
require_clean_work_tree
|
||||||
|
|
||||||
mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
|
|
||||||
if test ! -z "$2"
|
if test ! -z "$2"
|
||||||
then
|
then
|
||||||
output git show-ref --verify --quiet "refs/heads/$2" ||
|
output git show-ref --verify --quiet "refs/heads/$2" ||
|
||||||
@ -440,6 +438,8 @@ do
|
|||||||
HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
|
HEAD=$(git rev-parse --verify HEAD) || die "No HEAD?"
|
||||||
UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
|
UPSTREAM=$(git rev-parse --verify "$1") || die "Invalid base"
|
||||||
|
|
||||||
|
mkdir "$DOTEST" || die "Could not create temporary $DOTEST"
|
||||||
|
|
||||||
test -z "$ONTO" && ONTO=$UPSTREAM
|
test -z "$ONTO" && ONTO=$UPSTREAM
|
||||||
|
|
||||||
: > "$DOTEST"/interactive || die "Could not mark as interactive"
|
: > "$DOTEST"/interactive || die "Could not mark as interactive"
|
||||||
|
Loading…
Reference in New Issue
Block a user