git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth Falcon <sethfalcon@gmail.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org
Subject: Re: git-svn failure when symlink added in svn
Date: Sun, 15 Apr 2007 20:13:35 -0700	[thread overview]
Message-ID: <m2slb1c8ps.fsf@fhcrc.org> (raw)
In-Reply-To: 20070414201003.GA28389@muzzle

Eric Wong <normalperson@yhbt.net> writes:
> I can't reproduce it on Linux with ext3.  I translated your recipe into
> a test script in the patch below.  Anybody familiar with OSX and/or HFS
> know if there's a workaround or fix for this?

Thanks for sending the test case.  It doesn't properly fail for me on
OSX, but if I run it with -v then I do see the error (so it is failing
on OSX and, as you found, not on Linux).

I added a silly print statement to see the symlink args:

diff --git a/entry.c b/entry.c
index d72f811..70f6402 100644
--- a/entry.c
+++ b/entry.c
@@ -129,6 +129,7 @@ static int write_entry(struct cache_entry *ce, char *path, struct checkout *stat
                                return error("git-checkout-index: unable to write file %s",
                                        path);
                } else {
+                        fprintf(stderr, "symlink: '%s' => '%s'\n", path, new);
                        wrote = symlink(new, path);
                        free(new);
                        if (wrote)

And so then on Linux with -v I get (after snipping most of the
output):

   * expecting success: 
           cd git &&
                   git svn rebase
                   cd ..
   
           A       bar.txt
   r2 = 31e734669e3fe4dbbd375e5a9f5af828a5b7ba92 (git-svn)
           D       foo.txt
   r3 = bd3b318730e8efc77235976abb18d04bc927bf9e (git-svn)
           A       foo.txt
   r4 = 2376eedcfec1de7cbe69b2bbad1c5de231a0ed0d (git-svn)
   First, rewinding head to replay your work on top of it...
   symlink: 'foo.txt' => 'bar.txt'
   HEAD is now at 2376eed... add foo as symlink
   Fast-forwarded master to refs/remotes/git-svn.
   *   ok 4: rebase in git-svn
   
   * passed all 4 test(s)

On my OSX laptop I get:

   * expecting success: 
           cd git &&
                   git svn rebase
                   cd ..
   
           A       bar.txt
   r2 = 4964f302b94ede0301b33faf5f4242c4bab3108b (git-svn)
           D       foo.txt
   r3 = 178a9ff3c7013d4ad8ec7defa93b91a1080c1e53 (git-svn)
           A       foo.txt
   r4 = 9f0bc38df8113fe1e11e47b708589d82bfa035a0 (git-svn)
   First, rewinding head to replay your work on top of it...
   symlink: 'foo.txt' => ''
   error: git-checkout-index: unable to create symlink foo.txt (Invalid argument)
   HEAD is now at 9f0bc38... add foo as symlink
   Fast-forwarded master to refs/remotes/git-svn.
   *   ok 4: rebase in git-svn
   
   * passed all 4 test(s)

If you're still with me, the curious part is what the symlink call is
trying to do.

  Linux:    symlink: 'foo.txt' => 'bar.txt'
    OSX:    symlink: 'foo.txt' => ''

So it looks like the problem is some sort of off-by-one that happens
well before the symlink call.  Perhaps this is enough for someone more
knowledgable than me to have a clue where to look next?

+ seth

  reply	other threads:[~2007-04-16  3:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-14  6:41 git-svn failure when symlink added in svn Seth Falcon
2007-04-14 20:10 ` Eric Wong
2007-04-16  3:13   ` Seth Falcon [this message]
2007-04-26 23:07     ` Alexander Klink
2007-04-27 18:03       ` Linus Torvalds
2007-04-28 13:02         ` Alexander Klink
2007-04-28 16:54           ` Seth Falcon
2007-04-28 17:31           ` Junio C Hamano
2007-04-28 18:13             ` Seth Falcon
2007-04-28 18:34               ` Junio C Hamano
2007-04-28 21:15                 ` Seth Falcon
2007-04-28 22:43                   ` Junio C Hamano
     [not found]                     ` <m2irbfqlze.fsf@ziti.local>
2007-04-29 18:26                       ` Eric Wong
2007-04-30 14:43                         ` Seth Falcon
2007-04-30 15:43                           ` Eric Wong
2007-05-01 17:49                             ` Seth Falcon
2007-04-29 18:31                     ` Eric Wong
2007-04-29 21:01                       ` Junio C Hamano
2007-04-29 22:21                         ` Eric Wong
2007-04-30  0:24                           ` Alexander Klink
2007-04-30  5:08                           ` Junio C Hamano
2007-04-30  6:31                             ` Eric Wong
2007-04-30 14:33                               ` Seth Falcon
2007-05-01 20:53                             ` Alexander Klink

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=m2slb1c8ps.fsf@fhcrc.org \
    --to=sethfalcon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /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 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 NNTP newsgroup(s).