From: Daniel Cheng Date: Sat, 07 Mar 2009 16:05:02 GMT Subject: [JGit] Push to new Amazon S3 does not work? ("funny refname") Message-ID: 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 updates = new ArrayList(); 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