From: Junio C Hamano Date: Fri, 25 Sep 2020 22:25:39 +0000 (-0700) Subject: Merge branch 'jx/proc-receive-hook' X-Git-Tag: v2.29.0-rc0~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c430a647cb990fc856d328733fa59e1fafadb97;p=thirdparty%2Fgit.git Merge branch 'jx/proc-receive-hook' "git receive-pack" that accepts requests by "git push" learned to outsource most of the ref updates to the new "proc-receive" hook. * jx/proc-receive-hook: doc: add documentation for the proc-receive hook transport: parse report options for tracking refs t5411: test updates of remote-tracking branches receive-pack: new config receive.procReceiveRefs doc: add document for capability report-status-v2 New capability "report-status-v2" for git-push receive-pack: feed report options to post-receive receive-pack: add new proc-receive hook t5411: add basic test cases for proc-receive hook transport: not report a non-head push as a branch --- 6c430a647cb990fc856d328733fa59e1fafadb97 diff --cc builtin/receive-pack.c index 439f29d6c7,3eecb8c33c..bb9909c52e --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@@ -1625,10 -2028,10 +2030,12 @@@ static struct command *read_head_info(s linelen = strlen(reader->line); if (linelen < reader->pktlen) { const char *feature_list = reader->line + linelen + 1; + const char *hash = NULL; + int len = 0; if (parse_feature_request(feature_list, "report-status")) report_status = 1; + if (parse_feature_request(feature_list, "report-status-v2")) + report_status_v2 = 1; if (parse_feature_request(feature_list, "side-band-64k")) use_sideband = LARGE_PACKET_MAX; if (parse_feature_request(feature_list, "quiet")) diff --cc transport.c index 43e24bf1e5,a69f2cf806..ffe2115845 --- a/transport.c +++ b/transport.c @@@ -436,11 -443,7 +438,8 @@@ static void update_one_tracking_ref(str { struct refspec_item rs; - if (ref->status != REF_STATUS_OK && ref->status != REF_STATUS_UPTODATE) - return; - + memset(&rs, 0, sizeof(rs)); - rs.src = ref->name; + rs.src = refname; rs.dst = NULL; if (!remote_find_tracking(remote, &rs)) {