Re: Re: Sparse checkout not working as expected (colons in filenames on Windows)
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 25, 2015, 08:17 UTC
- Message-ID
- <576a56072f8f30818b7af016e0ead628@www.dscho.org>
- In-Reply-To
- <CACsJy8CZPufnyjdx0Z+SuUNhQ58gvKQprY98V7EJnodHgeyK5A@mail.gmail.com>
Hi Duy,
On 2015-03-25 07:44, Duy Nguyen wrote:
Show 27 quoted lines
> On Wed, Mar 25, 2015 at 1:39 PM, Johannes Schindelin > <johannes.schindelin@gmx.de> wrote: >> >> On 2015-03-25 01:46, Duy Nguyen wrote: >>> On Wed, Mar 25, 2015 at 6:50 AM, Philip Oakley <philipoakley@iee.org> wrote: >>> >>>> That said, the final error (which I'd missed in the earlier post) is: >>>> fatal: make_cache_entry failed for path 'ifcfg-eth0:0' >>>> >>>> This is on the Windows (pre-compiled msysgit at v1.9.5) Git bash, so could >>>> be a catch path in that code for make_cache_entry (I've not checked the code >>>> yet). So at the moment it doesn't look like sparse checkout can be used to >>>> avoid colons in windows on-disk files based on the current code. >>> >>> Both of your commands below fail by the same function, verify_path() >>> because of this msysgit commit 2e2a2d1 (NTFS: Prevent problematic >>> paths from being checked out - 2014-12-10). I guess that check is a >>> bit too strong, it should apply when new index entries are created >>> from worktree (not from a tree).. >> >> Oh, right, that check needs some relaxing. But certainly in a different way: you *definitely* want to prevent attacks from the outside, and those originate from the *tree*. >> >> What we need to do instead is to relax the check to apply only if we are really going to write out that file, not when it is skipped. > > Yeah. In fact if you do this, not checking out files that can't be or > not safe to be checked out, then the ifcfg-eth0:0 problem that Phillip > wanted to avoid using sparse checkout is also gone.
I had a quick look at the `verify_path()` function and have to say: it is more complicated than this. At the point when this function is called, we are only concerned with the index. So we have no idea whether we are going to write this to disk or not.
I guess there is a much easier solution to this: set `core.protectntfs` to `false` in this specific repository, before checking out any files.
Ciao, Johannes
-- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Git for Windows" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.