remote-helpers: http-push protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heya,

I'm trying to figure out how the current http push protocol is
implemented. What I've been able to deduce on my own:

When fetching from the remote, the helper is called with 'list', after
which it will give back a list of refs, 'remote' style. That is, the
remote master branch will be listed as '<remote sha>
refs/heads/master'.
When pushing to the remote, the helper is called with 'list for-push',
it will again list all refs in the same manner (omitting 'HEAD' if the
smart protocol is used).

What happens next is the part that confuses me, a certain set of refs
is pushed, by calling the helper with 'push <refspec>'. I am unclear
how this set of refs is chosen, I see that only refs that have a
peer_ref are sent, unless mirror is also set (I don't think I
understand the significance)? After the push, the helper write a set
of 'ok/error' messages, sometimes for refs that were not asked to be
pushed in the first place, errors for those are ignored though (the
error parsing code ignores an error if the ref was not scheduled to be
pushed).

Can you clarify the behavior I described? How can I best hook into the
'refs that need to be pushed selection' in the 'export' command [0]?

[0] The export command currently tries to export all refs it gets from
push_refs, which seems to be everything that the helper got from the
'list' command. The only reason this has worked so far it seems is
that all branches listed by 'list' were present as local branches.

-- 
Cheers,

Sverre Rabbelier
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]