All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf.ethz.ch>
To: David Goldfarb <deg@degel.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: trouble on windows network share
Date: Mon, 6 May 2013 12:08:18 +0200	[thread overview]
Message-ID: <878v3sh14d.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <8B6563E531152E4190313499F193F94214AAAB42@mbx500-u1-lo-3.exch500.msoutlookonline.net> (David Goldfarb's message of "Mon, 6 May 2013 09:53:51 +0000")

David Goldfarb <deg@degel.com> writes:

> Looks like it works.
>
> From the windows machine:
>     U:\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856
>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1
>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2
>
>     U:\foo>
>
>
> Double-checking that nothing was fixed or changed when I earlier committed the file from Linux, here's a second test:
>
>
>     U:\foo>git cat-file -p 0b89efdeef245ed6a0a7eacc5c578629a141f856
>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1
>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2
>     
>     U:\foo>git status
>     # On branch master
>     # Untracked files:
>     #   (use "git add <file>..." to include in what will be committed)
>     #
>     #       trace1
>     #       trace2
>     nothing added to commit but untracked files present (use "git add" to track)
>     
>     U:\foo>git add trace1
>     
>     U:\foo>git commit trace1 -m "testing"

Note that specifying 'trace1' here is redundant, since you already added
it and had no other staged changes.  Perhaps you can re-run a test like
this without the extra argument for comparison.  That would tell us if
it matters that the write and read happen in the same process.

>     error: unable to find cecae5b4c87ea21aef513fcfcd5c27fe87e0536f
>     fatal: cecae5b4c87ea21aef513fcfcd5c27fe87e0536f is not a valid object
>     
>     U:\foo>git cat-file -p cecae5b4c87ea21aef513fcfcd5c27fe87e0536f
>     100644 blob b02e7c87fe376a353ea4f014bdb3f5200a946b37    foo1
>     100644 blob 2cbf64f759a62392ad9dfe1fb9c2cdb175876014    foo2
>     100644 blob 19102815663d23f8b75a47e7a01965dcdc96468c    test.txt
>     100644 blob c9009b02950964cf1d5281125e6e2f647dd9dc16    trace1

I'm inclined to just say that your FS is crazy.

What's unsatisfactory is that we already have a bunch of crazy FS
workarounds in move_temp_to_file(), which is one obvious candidate for
what is going on here.  So this wouldn't be something new; just another
craziness to work around.

For example, you could test the theory that rename() has something to do
with it by patching this into move_temp_to_file():

diff --git i/sha1_file.c w/sha1_file.c
index 67e815b..22af015 100644
--- i/sha1_file.c
+++ w/sha1_file.c
@@ -2635,6 +2635,10 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
 		/* FIXME!!! Collision check here ? */
 	}
 
+	if (access(filename, R_OK) < 0)
+		return error("access(%s, R_OK) failed immediately after rename(): %s",
+			     filename, strerror(errno));
+
 out:
 	if (adjust_shared_perm(filename))
 		return error("unable to set permission to '%s'", filename);


-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-05-06 10:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04 15:01 trouble on windows network share Pyeron, Jason J CTR (US)
2013-04-04 15:51 ` Jeff King
2013-04-05 12:44   ` Pyeron, Jason J CTR (US)
2013-04-11  4:56     ` Jeff King
2013-05-02 21:26 ` deg
2013-05-03  9:27   ` Thomas Rast
2013-05-04 23:23     ` David Goldfarb
2013-05-06  9:42       ` Thomas Rast
2013-05-06  9:53         ` David Goldfarb
2013-05-06 10:08           ` Thomas Rast [this message]
2013-05-06 10:13             ` David Goldfarb
2013-05-06 10:46             ` David Goldfarb
2013-05-06 13:10         ` Pyeron, Jason J CTR (US)
2013-05-08  9:37           ` David Goldfarb
2013-05-09 13:52             ` Pyeron, Jason J CTR (US)
2013-12-03 16:48               ` Phil Wiffen
2013-12-03 17:30                 ` Pyeron, Jason J CTR (US)

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=878v3sh14d.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf.ethz.ch \
    --cc=deg@degel.com \
    --cc=git@vger.kernel.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.