git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [JGIT] Pushing the HEAD ref?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 17, 2009, 14:28 UTC
Message-ID
<20090317142835.GB20222@spearce.org>
In-Reply-To
<ff6a9c820903162104v2ca62437ua3da6bafba3ea101@mail.gmail.com>
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.
Previous: Daniel Cheng
Message 2 of 2 in “[JGIT] Pushing the HEAD ref?”
  1. Daniel ChengMar 17, 2009
  2. Shawn O. PearceMar 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.