aboutsummaryrefslogtreecommitdiff
path: root/git-rebase.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-14 14:05:35 -0700
committerJunio C Hamano <gitster@pobox.com>2008-07-14 14:05:35 -0700
commit324c2c3177ca5b62b12029ce8821542fc29a2733 (patch)
tree0ed73d907d348e1f82f956c4b9cd28dd6f900009 /git-rebase.sh
parentdc6282d2013792c0df625527e12a54e40d07b122 (diff)
downloadgit-324c2c3177ca5b62b12029ce8821542fc29a2733.tar.gz
git-324c2c3177ca5b62b12029ce8821542fc29a2733.tar.xz
git-rebase: report checkout failure
When detaching the HEAD to the base commit, the "git checkout" command could fail if, for example, upstream contains a file that would overrwrite a local, untracked file. Unconditionally discarding the standard error stream was done to squelch the progress and notices back when checkout did not have -q option, but there is no reason to keep doing it anymore. Noticed by Robert Shearman. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase.sh')
-rwxr-xr-xgit-rebase.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index e2d85eeea..7825f8895 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -376,9 +376,7 @@ fi
# Detach HEAD and reset the tree
echo "First, rewinding head to replay your work on top of it..."
-git checkout "$onto^0" >/dev/null 2>&1 ||
- die "could not detach HEAD"
-# git reset --hard "$onto^0"
+git checkout -q "$onto^0" || die "could not detach HEAD"
# If the $onto is a proper descendant of the tip of the branch, then
# we just fast forwarded.