git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-rebase.sh: Display error output from git-checkout when detaching HEAD fails.
@ 2008-07-11 21:26 Robert Shearman
  2008-07-11 22:57 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Shearman @ 2008-07-11 21:26 UTC (permalink / raw)
  To: git; +Cc: Robert Shearman

The "git checkout" command executed could fail if, for example, upstream contains a file that would overrwrite a local, untracked file. The output redirection didn't work as stderr was redirected to /dev/null, as was stdout. This appears to be not what was intended so the order of redirections is fixed so that stderr is redirected to stdout instead.
---
 git-rebase.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index e2d85ee..0da2210 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -376,7 +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 ||
+git checkout "$onto^0" 2>&1 >/dev/null ||
 	die "could not detach HEAD"
 # git reset --hard "$onto^0"
 
-- 
1.5.6.2.225.g4596.dirty

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-15 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-11 21:26 [PATCH] git-rebase.sh: Display error output from git-checkout when detaching HEAD fails Robert Shearman
2008-07-11 22:57 ` Junio C Hamano
2008-07-14 19:57   ` Rob Shearman
2008-07-15 15:22     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).