git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
To: Daniel Cheng <j16sdiz+freenet@gmail.com>, spearce@spearce.org
Cc: git@vger.kernel.org
Subject: Re: [JGit] Push to new Amazon S3 does not work? ("funny refname")
Date: Sat, 7 Mar 2009 18:50:37 +0100	[thread overview]
Message-ID: <200903071850.38045.robin.rosenberg.lists@dewire.com> (raw)
In-Reply-To: <ff6a9c820903070805m34f792dard6b17d2029e41dfe@mail.gmail.com>

lördag 07 mars 2009 17:05:02 skrev Daniel Cheng <j16sdiz+freenet@gmail.com>:
> Pushing to new Amazon S3 repository does not work.
> It say "funny refname" without pushing anything:
> 
> <<<<<<<<<
> $ jgit push s3 master
> To amazon-s3://0NQ4APQ8R7S6HQ65TWR2@egitsdiz/1.git
>  ! [remote rejected] master -> master (funny refname)
> $ s3cmd la
>          DIR   s3://egitsdiz/1.git/
> $
> >>>>>>>>>
> 
> Any idea what's happening here?
> 
> 
> The code is in WalkPushConnection.java line 137:
> <<<<<<<<<
> 134    final List<RemoteRefUpdate> updates = new ArrayList<RemoteRefUpdate>();
> 135    for (final RemoteRefUpdate u : refUpdates.values()) {
> 136        final String n = u.getRemoteName();
> 137        if (!n.startsWith("refs/") || !Repository.isValidRefName(n)) {
> 138            u.setStatus(Status.REJECTED_OTHER_REASON);
> 139            u.setMessage("funny refname");
> 140            continue;
> 141        }
> >>>>>>>>>
> 
> u.getRemoteName() gives "master" here.
> Removing  n.startsWith("refs/") would generate a bad `packed-refs`
> file in later code.
> I tried to fix this, but failed to do so without breaking GitSsh transports

This is not specific to s3. It seems jgit wants a fully qualified ref for the remote
side, so refs/heads/master will work for the other protocols, and I guess s3 too.

- robin

  reply	other threads:[~2009-03-07 17:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 16:05 [JGit] Push to new Amazon S3 does not work? ("funny refname") Daniel Cheng
2009-03-07 17:50 ` Robin Rosenberg [this message]
2009-03-07 21:10   ` Shawn O. Pearce
2009-03-07 22:18     ` [EGIT PATCH] Evaluate short refnames into full names during push Robin Rosenberg
2009-03-07 22:48       ` Shawn O. Pearce
2009-03-08 15:21         ` [EGIT PATCH] Prevent an exception if the user tries to push a non-existing ref Robin Rosenberg
2009-03-09 15:50           ` Shawn O. Pearce
2009-03-09 21:29             ` Robin Rosenberg

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=200903071850.38045.robin.rosenberg.lists@dewire.com \
    --to=robin.rosenberg.lists@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=j16sdiz+freenet@gmail.com \
    --cc=spearce@spearce.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 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).