All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <J.Sixt@eudaptics.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: [PATCH] git-gui: '/dev/null' on Windows is named 'nul'
Date: Wed, 07 Mar 2007 17:26:34 +0100	[thread overview]
Message-ID: <45EEE7BA.E0603922@eudaptics.com> (raw)

From: Johannes Sixt <johannes.sixt@telecom.at>

Making (or amending) an initial commit on Windows fails because
redirecting something to '/dev/null' must fail - this device does not exist.
Redirect to 'nul' instead.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 I've noticed this while using the MinGW port, but I do not know whether
 this is needed or even works on Cygwin.

 (Now lets see whether my MUA wraps long lines...)

 -- Hannes

 git-gui/git-gui.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index f84ba33..971d5fe 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -1288,7 +1288,11 @@ proc commit_committree {fd_wt curHEAD msg} {
 		}
 	} else {
 		# git commit-tree writes to stderr during initial commit.
-		lappend cmd 2>/dev/null
+		if {[is_Windows]} {
+			lappend cmd 2>nul
+		} else {
+			lappend cmd 2>/dev/null
+		}
 	}
 	lappend cmd <$msg_p
 	if {[catch {set cmt_id [eval exec $cmd]} err]} {
-- 
1.5.0.2.279.g4808

             reply	other threads:[~2007-03-07 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 16:26 Johannes Sixt [this message]
2007-03-07 16:57 ` [PATCH] git-gui: '/dev/null' on Windows is named 'nul' Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45EEE7BA.E0603922@eudaptics.com \
    --to=j.sixt@eudaptics.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.