Merge branch 'jx/proc-receive-hook' into pu
"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 refs.c: refactor to reuse ref_is_hidden() receive-pack: feed report options to post-receive doc: add document for capability report-status-v2 New capability "report-status-v2" for git-push 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
This commit is contained in:
13
refs.c
13
refs.c
@ -1346,14 +1346,14 @@ int parse_hide_refs_config(const char *var, const char *value, const char *secti
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ref_is_hidden(const char *refname, const char *refname_full)
|
||||
int ref_matches(struct string_list *match_refs, const char *refname, const char *refname_full)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!hide_refs)
|
||||
if (!match_refs)
|
||||
return 0;
|
||||
for (i = hide_refs->nr - 1; i >= 0; i--) {
|
||||
const char *match = hide_refs->items[i].string;
|
||||
for (i = match_refs->nr - 1; i >= 0; i--) {
|
||||
const char *match = match_refs->items[i].string;
|
||||
const char *subject;
|
||||
int neg = 0;
|
||||
const char *p;
|
||||
@ -1379,6 +1379,11 @@ int ref_is_hidden(const char *refname, const char *refname_full)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ref_is_hidden(const char *refname, const char *refname_full)
|
||||
{
|
||||
return ref_matches(hide_refs, refname, refname_full);
|
||||
}
|
||||
|
||||
const char *find_descendant_ref(const char *dirname,
|
||||
const struct string_list *extras,
|
||||
const struct string_list *skip)
|
||||
|
Reference in New Issue
Block a user