@matheusbsbs / matheus-bagliano / commits / 324c2c3177
Fork 0

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>

Junio C Hamano committed Jul 14, 2008 at 14:05 UTC 324c2c3177ca5b62b12029ce8821542fc29a2733
1 file changed +1 -3
git-rebase.sh
+1 -3
@@ -376,9 +376,7 @@ fi
376
377 # Detach HEAD and reset the tree
378 echo "First, rewinding head to replay your work on top of it..."
379 -git checkout "$onto^0" >/dev/null 2>&1 ||
380 - die "could not detach HEAD"
381 -# git reset --hard "$onto^0"
379 +git checkout -q "$onto^0" || die "could not detach HEAD"
380
381 # If the $onto is a proper descendant of the tip of the branch, then
382 # we just fast forwarded.