git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Cheng <j16sdiz+freenet@gmail.com>
To: git@vger.kernel.org
Subject: [JGit] Push to new Amazon S3 does not work? ("funny refname")
Date: Sun, 8 Mar 2009 00:05:02 +0800	[thread overview]
Message-ID: <ff6a9c820903070805m34f792dard6b17d2029e41dfe@mail.gmail.com> (raw)

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

             reply	other threads:[~2009-03-07 16:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07 16:05 Daniel Cheng [this message]
2009-03-07 17:50 ` [JGit] Push to new Amazon S3 does not work? ("funny refname") Robin Rosenberg
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=ff6a9c820903070805m34f792dard6b17d2029e41dfe@mail.gmail.com \
    --to=j16sdiz+freenet@gmail.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 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).