Re: [PATCH v2 0/4] Never report references we not push

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

 



Jiang Xin <worldhello.net@xxxxxxxxx> 于2020年3月29日周日 下午10:33写道:
>
> ## Changes since v1:
>
> * Add a new common method `reject_atomic_push()`, which is reused for
>   atomic push rejection for SSH and HTTP protocol.

I first try to add some common methods in `transport_push()` of
"transport.c", but I find it is hard to do this.  Because the
capabilities has not been set after calling
`transport->vtable->get_refs_list` for HTTP protocol.

And for the same reason, the following code in `send-pack.c` cannot
move to `set_ref_status_for_push()`.

    /*
     * NEEDSWORK: why does delete-refs have to be so specific to
     * send-pack machinery that set_ref_status_for_push() cannot
     * set this bit for us???
     */
    for (ref = remote_refs; ref; ref = ref->next)
        if (ref->deletion && !allow_deleting_refs)
                ref->status = REF_STATUS_REJECT_NODELETE

I wonder if we can extend method `get_refs_list()` of
"transport-helper.c"  and "remote-curl.c", so we can all method
`server_supports()` in `transport_push()` of "transport.c".




[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]

  Powered by Linux