git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGit] Push to new Amazon S3 does not work? ("funny refname")
@ 2009-03-07 16:05 Daniel Cheng
  2009-03-07 17:50 ` Robin Rosenberg
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Cheng @ 2009-03-07 16:05 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-03-09 21:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).