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

Re: Symbolic refs and the git protocol?

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Sep 26, 2011, 14:23 UTC
Message-ID
<CAMK1S_gfw4WUdhdCzFMNbJXJP7762tp62fpmQ_-qJLwvD1hR-A@mail.gmail.com>
In-Reply-To
<CAMK1S_g1Co8vogBuObQVsr+nT09urYs+qifJn1X+eGrkgUQZCA@mail.gmail.com>
On Sun, Sep 25, 2011 at 7:40 PM, Sitaram Chamarty <sitaramc@gmail.com> wrote:
Show 36 quoted lines
> On Sun, Sep 25, 2011 at 7:18 PM, Avi Kivity <avi@redhat.com> wrote:
>> On 09/25/2011 04:42 PM, Sitaram Chamarty wrote:
>>>
>>> On Sun, Sep 25, 2011 at 6:47 PM, Avi Kivity<avi@redhat.com>  wrote:
>>> >  With the old kernel.org setup, practically the only think I needed to
>>> > do on
>>> >  the server itself is the 'git symbolic-ref' command (used to point
>>> >  refs/heads/linux-next at the correct stream).
>>> >
>>> >  Now it looks like kernel.org will no longer offer shell access.  Is it
>>> >  possible to support symbolic-ref via 'git push'?
>>>
>>> Can I assume you mean specifically for HEAD, as in 'git symbolic-ref
>>> HEAD refs/heads/some-branch'?
>>
>> No, I use them for ordinary branches, for example
>>
>>  git symbolic-ref refs/heads/linux-next refs/heads/kvm-updates/3.2
>>
>> from this point on, any update to kvm-updates/3.2 will be reflected in the
>> linux-next ref.
>>
>>> Although gitolite disables shell access by design, it provides several
>>> (optionally installed) features to allow specific shell commands to be
>>> executed.  One such command is "set-head", which does exactly what you
>>> ask.  You run it like 'ssh git@server set-head reponame.git
>>> refs/heads/foo' and it ends up running 'git symbolic-ref HEAD
>>> refs/heads/foo' in the repo.
>>>
>>> I realise that does not answer "can it be done via git push" but I
>>> thought it might help...
>>
>> Well, if set-head can be extended a bit, it would suit me perfectly.
>
> no reason it can't; shorn of all the argument/access checking, it's a
> very simple shell script
Done.
https://github.com/sitaramc/gitolite/commit/a2fd597c51a086a0f7298c1641337faa0f296a62
I like this much better actually, so thanks for the idea.
Previous: Sitaram ChamartyNext: Avi Kivity
Message 5 of 7 in “Symbolic refs and the git protocol?”
  1. Avi KivitySep 25, 2011
  2. Sitaram ChamartySep 25, 2011
  3. Avi KivitySep 25, 2011
  4. Sitaram ChamartySep 25, 2011
  5. Sitaram ChamartySep 26, 2011
  6. Avi KivitySep 26, 2011
  7. Ilari LiusvaaraSep 25, 2011

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.