From: Marius Storm-Olsen <marius@trolltech.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Daniel Barkalow <barkalow@iabervon.org>,
Git Mailing List <git@vger.kernel.org>,
msysGit <msysgit@googlegroups.com>
Subject: Re: [PATCH] "git checkout -- paths..." should signal error
Date: Thu, 29 May 2008 08:28:25 +0200 [thread overview]
Message-ID: <483E4D09.1070400@trolltech.com> (raw)
In-Reply-To: <7vtzgirus5.fsf_-_@gitster.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]
Junio C Hamano said the following on 28.05.2008 23:19:
> When "git checkout -- paths..." cannot update work tree for whatever
> reason, checkout_entry() correctly issued an error message for the path to
> the end user, but the command ignored the error, causing the entire
> command to succeed. This fixes it.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>
> * Now that we detect this failure, post-checkout-hook _might_ want to
> know that what we have is an incomplete checkout. Not calling the hook
> in such a case may be another option, but we always called the hook and
> that would be a change in behaviour.
>
> builtin-checkout.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/builtin-checkout.c b/builtin-checkout.c
I'd like to just chip in that you actually _can_ create those files
(nul, con, prn, all which are "special" filenames on Windows), but
need a slight different construct to create them. That, and most tools
will break on _using_ them, since they's also have to refer to them in
a certain way.
So, certainly msysgit could write a workaround to handle such cases.
(Git would also know how to remove these files on Windows)
Though, I still think that your patch is a Good Thing(tm).
For example, if you:
D:\some\path> echo foo > nul # Ok, an no output, nor file created
D:\some\path> echo foo > .\nul # Same thing
D:\some\path> echo foo > \\.\d:\some\path\nul # Creates the nul file
Directory of D:\some\path
29.05.2008 08:23 <DIR> .
29.05.2008 08:23 <DIR> ..
29.05.2008 08:23 6 con
29.05.2008 08:22 6 nul
29.05.2008 08:23 6 prn
3 File(s) 18 bytes
D:\some\path> del .\nul
The filename, directory name, or volume label syntax is incorrect.
D:\some\path> del \\.\d:\some\path\nul # Success
--
.marius [@trolltech.com]
'if you know what you're doing, it's not research'
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 187 bytes --]
next prev parent reply other threads:[~2008-05-29 6:29 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-26 14:01 Commit cce8d6fdb introduces file t/t5100/nul, git tree is now incompatible with Cygwin (and probably Windows) Mark Levedahl
2008-05-26 14:25 ` Johannes Schindelin
2008-05-26 17:37 ` Mark Levedahl
2008-05-26 21:28 ` Johannes Schindelin
2008-05-26 22:49 ` Mark Levedahl
2008-05-26 23:10 ` Johannes Schindelin
2008-05-26 23:15 ` Johannes Schindelin
[not found] ` <483ADA17.3080401@viscovery.net>
2008-05-26 21:21 ` [PATCH] Makefile: wt-status.h is also a lib header Johannes Schindelin
2008-05-26 21:54 ` Junio C Hamano
2008-05-26 23:03 ` Johannes Schindelin
2008-05-27 13:26 ` Commit cce8d6fdb introduces file t/t5100/nul, git tree is now incompatible with Cygwin (and probably Windows) Eric Blake
2008-05-28 6:12 ` Junio C Hamano
2008-05-28 9:46 ` Wincent Colaiuta
2008-05-28 15:53 ` Lea Wiemann
2008-05-28 15:58 ` Wincent Colaiuta
2008-05-28 21:39 ` Jakub Narebski
2008-05-29 13:22 ` Johannes Schindelin
2008-05-29 14:58 ` Wincent Colaiuta
2008-05-29 16:05 ` Johannes Schindelin
2008-05-29 16:15 ` Wincent Colaiuta
2008-05-31 17:37 ` Steffen Prohaska
2008-05-31 18:28 ` [PATCH] gitweb: Remove gitweb/test/ directory Jakub Narebski
2008-05-31 18:49 ` Wincent Colaiuta
2008-05-31 23:19 ` Johannes Schindelin
2008-06-01 0:19 ` Jakub Narebski
2008-06-01 9:42 ` Kay Sievers
2008-06-01 19:07 ` Wincent Colaiuta
2008-06-01 1:06 ` Junio C Hamano
2008-06-01 1:59 ` Jakub Narebski
2008-05-28 16:33 ` Commit cce8d6fdb introduces file t/t5100/nul, git tree is now incompatible with Cygwin (and probably Windows) Avery Pennarun
2008-05-28 17:24 ` Junio C Hamano
2008-05-28 17:46 ` Sverre Rabbelier
2008-05-28 17:52 ` Avery Pennarun
2008-05-28 18:27 ` Junio C Hamano
2008-05-28 18:19 ` Daniel Barkalow
2008-05-28 18:37 ` Junio C Hamano
2008-05-28 20:06 ` Daniel Barkalow
2008-05-28 20:43 ` Junio C Hamano
2008-05-28 21:19 ` [PATCH] "git checkout -- paths..." should signal error Junio C Hamano
2008-05-29 6:28 ` Marius Storm-Olsen [this message]
2008-05-29 13:05 ` Daniel Barkalow
2008-05-28 21:41 ` Commit cce8d6fdb introduces file t/t5100/nul, git tree is now incompatible with Cygwin (and probably Windows) Daniel Barkalow
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=483E4D09.1070400@trolltech.com \
--to=marius@trolltech.com \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=msysgit@googlegroups.com \
/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.