threads / discuss / 18337

[JGIT] Pushing the HEAD ref?

Subject: [JGIT] Pushing the HEAD ref?

## tl;dr

2 messages between Mar 17, 2009 and Mar 17, 2009.

replies: 1people: 2as markdown or json

Daniel Cheng· Mar 17, 2009, 04:04 UTC · lore
Hi List,

When I develop the freenet transport, I found the refWriter in WalkPushConnection never write the HEAD refs, even if this is a new repository. Is this the expected behaviour? This cause error when I clone the repository.

Regards, Daniel Cheng.

Shawn O. Pearce· Mar 17, 2009, 14:28 UTC · re: Daniel Cheng · lore

Re: [JGIT] Pushing the HEAD ref?

Daniel Cheng <j16sdiz+freenet@gmail.com> wrote:
Show 5 quoted lines
> 
> When I develop the freenet transport, I found the refWriter in
> WalkPushConnection never write the HEAD refs, even if this is a new
> repository.
> Is this the expected behaviour? This cause error when I clone the repository.
Nope.

Check WalkPushConnection's createNewRepository(). The method is called from line 162 where we try to create a new HEAD symbolic ref to one of the refs/heads/$name being pushed, and we also put a tiny config file. This way a repository pushed over sftp:// is a valid repository if you later get shell access to it.

Sounds like you didn't push a refs/heads/$name when you created the repository, or you something is broken in this section.

-- 
Shawn.

← back to recent threads