From: Daniel Barkalow <barkalow@iabervon.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Avery Pennarun <apenwarr@gmail.com>,
Mark Levedahl <mlevedahl@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: Commit cce8d6fdb introduces file t/t5100/nul, git tree is now incompatible with Cygwin (and probably Windows)
Date: Wed, 28 May 2008 16:06:40 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.1.00.0805281455100.19665@iabervon.org> (raw)
In-Reply-To: <7vskw2tgu2.fsf@gitster.siamese.dyndns.org>
On Wed, 28 May 2008, Junio C Hamano wrote:
> Daniel Barkalow <barkalow@iabervon.org> writes:
>
> > Report a non-fatal error, mark in the index that that entry is not
> > reflected in the working directory, and allow the user to manipulate it
> > with commands that don't really need the working directory content.
> >
> > $ git checkout origin/master
> > Warning: couldn't create 't/t5100/nul' in your working directory; ignoring
> > working directory for this filename.
> > $ git mv t/t5100/nul t/t5100/nul-plain
> > $ ls t/t5100/nul-plain
> > t/t5100/nul-plain
> >
> > The working directory doesn't really have to be absolutely vital to git's
> > functioning (of course, the project you've checked out is going to have
> > problems unless you fix things). In particular, it should be possible, on
> > a machine with a broken filesystem, to modify a project that triggers the
> > filesystem breakage to not trigger it,...
>
> Now that is somebody who thinks before types.
Well, and I've got the background to know what's possible and how git can
keep things straight.
> Marking that the filesystem does not match what's in index is already
> done, so you could argue that an alternative would be not to stop in the
> middle of checkout_entry() loop and instead check out as much as we could,
> write out the index perhaps, and signal error, _AFTER_ updating everything
> else, including the HEAD. We try to be atomic when able (e.g. on a broken
> patch, "apply" does not apply early half the patch and fail but rejects
> the whole thing), but checkout_entry() loop is not something you can
> sanely make atomic (it needs to first remove existing files and even
> directories before writing new files), so that alternative approach might
> be easier to work with.
Ah, yes, CE_VALID. But it doesn't quite work as well as I'd like, because
it doesn't ignore fstat/readdir not finding anything on the filesystem, so
it comes out looking deleted, at least if you're actually on Linux (with a
hack in create_file to refuse to create certain filenames for testing).
Also "git mv CE_VALID-source dest" doesn't ignore the filesystem like it
should (for this use, anyway). Perhaps we need an additional flag for "the
filesystem is irrelevant for this entry".
> Care to follow it up with a patch?
Unfortunately, I don't think I'll have a chance for a while to actually
work on git code. But if someone else (Avery?) wants to try it, I think
giving a big warning, setting CE_VALID, and returning 0 in entry.c before
the "unable to create file" message is the right thing to start with. And
someone with Windows access should figure out what happens next.
I think the right test for this is if create_file() returns EEXIST, but
readdir doesn't show anything. For that matter, it might be useful to have
logic that notes the situation where you seem to have file A instead of
file B, but fstat("B") returns A's inode, and marks the index to say that
entry B is listed in the filesystem as A instead.
-Daniel
*This .sig left intentionally blank*
next prev parent reply other threads:[~2008-05-28 20:07 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 [this message]
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
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.1.00.0805281455100.19665@iabervon.org \
--to=barkalow@iabervon.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mlevedahl@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).