Skip to contentSkip to conversation

Symbolic refs and the git protocol?

DISCUSSION Avi Kivity 3 participants 7 messages Jun 15, 2016

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

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'?

Signature · 1 line
error compiling committee.c: too many arguments to function
#1 lore raw
Quoted 3 lines · Avi Kivity

Now it looks like kernel.org will no longer offer shell access. Is it possible to support symbolic-ref via 'git push'?

AFAIK, no, it isn't.

-Ilari

#2 lore raw
In reply to Avi Kivity
Quoted 6 lines · Avi Kivity

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'?

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

author
#3 lore raw
Quoted 10 lines · Sitaram Chamarty
Quoted 6 lines · Avi Kivity

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.

Quoted 9 lines

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.

Signature · 1 line
error compiling committee.c: too many arguments to function
#4 lore raw
Quoted 28 lines · Avi Kivity
Quoted 7 lines · Sitaram Chamarty
Quoted 5 lines · Avi Kivity

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

Quoted 5 lines
Quoted 2 lines

 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.

Quoted 7 lines

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.

Quoted 4 lines
Quoted 2 lines

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

Signature · 1 line
Sitaram
#5 lore raw
Quoted 29 lines · Sitaram Chamarty
Quoted 28 lines · Avi Kivity
Quoted 7 lines · Sitaram Chamarty
Quoted 5 lines · Avi Kivity

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

Quoted 5 lines
Quoted 2 lines

 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.

Quoted 7 lines

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.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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.

author
#6 lore raw
Quoted 35 lines · Sitaram Chamarty
Quoted 34 lines · Sitaram Chamarty
Quoted 32 lines · Avi Kivity
Quoted 7 lines · Sitaram Chamarty
Quoted 5 lines · Avi Kivity

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

Quoted 5 lines
Quoted 2 lines

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.

Quoted 9 lines

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.

Quoted 8 lines
Quoted 2 lines

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.

Thanks very much for the rapid response and update!

John, can we get this into the new kernel.org infrastructure?

Signature · 1 line
error compiling committee.c: too many arguments to function