{"thread":{"id":"7137","subject":"[PATCH] git-gui: '/dev/null' on Windows is named 'nul'","startedAt":"2007-03-07T16:26:34Z","lastAt":"2007-03-07T16:57:45Z","messageCount":2,"participants":["Johannes Sixt","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"36551","messageId":"45EEE7BA.E0603922@eudaptics.com","threadId":"7137","inReplyTo":null,"subject":"[PATCH] git-gui: '/dev/null' on Windows is named 'nul'","fromName":"Johannes Sixt","fromEmail":"j.sixt@eudaptics.com","sentAt":"2007-03-07T16:26:34Z","receivedAt":"2007-03-07T16:26:34Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <johannes.sixt@telecom.at>\n\nMaking (or amending) an initial commit on Windows fails because\nredirecting something to '/dev/null' must fail - this device does not exist.\nRedirect to 'nul' instead.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n I've noticed this while using the MinGW port, but I do not know whether\n this is needed or even works on Cygwin.\n\n (Now lets see whether my MUA wraps long lines...)\n\n -- Hannes\n\n git-gui/git-gui.sh |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex f84ba33..971d5fe 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -1288,7 +1288,11 @@ proc commit_committree {fd_wt curHEAD msg} {\n \t\t}\n \t} else {\n \t\t# git commit-tree writes to stderr during initial commit.\n-\t\tlappend cmd 2>/dev/null\n+\t\tif {[is_Windows]} {\n+\t\t\tlappend cmd 2>nul\n+\t\t} else {\n+\t\t\tlappend cmd 2>/dev/null\n+\t\t}\n \t}\n \tlappend cmd <$msg_p\n \tif {[catch {set cmt_id [eval exec $cmd]} err]} {\n-- \n1.5.0.2.279.g4808\n"},{"id":"36555","messageId":"20070307165745.GA27922@spearce.org","threadId":"7137","inReplyTo":"45EEE7BA.E0603922@eudaptics.com","subject":"Re: [PATCH] git-gui: '/dev/null' on Windows is named 'nul'","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-07T16:57:45Z","receivedAt":"2007-03-07T16:57:45Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Johannes Sixt <J.Sixt@eudaptics.com> wrote:\n> From: Johannes Sixt <johannes.sixt@telecom.at>\n> \n> Making (or amending) an initial commit on Windows fails because\n> redirecting something to '/dev/null' must fail - this device does not exist.\n> Redirect to 'nul' instead.\n> \n> Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n> ---\n>  I've noticed this while using the MinGW port, but I do not know whether\n>  this is needed or even works on Cygwin.\n\nI had previously fixed this in gitgui-0.6.3, which is now also\nmerged into `maint` in git.git.  It was fixed by just removing that\nredirection block, in git 1.5.0 and later commit-tree doesn't print\nanything on stderr when making an initial commit.\n \n-- \nShawn.\n"}]}