mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'jt/push-negotiation-fixes'
Bugfix for common ancestor negotiation recently introduced in "git push" code path. * jt/push-negotiation-fixes: fetch: die on invalid --negotiation-tip hash send-pack: fix push nego. when remote has refs send-pack: fix push.negotiate with remote helper
This commit is contained in:
@@ -425,8 +425,10 @@ static void get_commons_through_negotiation(const char *url,
|
||||
child.no_stdin = 1;
|
||||
child.out = -1;
|
||||
strvec_pushl(&child.args, "fetch", "--negotiate-only", NULL);
|
||||
for (ref = remote_refs; ref; ref = ref->next)
|
||||
strvec_pushf(&child.args, "--negotiation-tip=%s", oid_to_hex(&ref->new_oid));
|
||||
for (ref = remote_refs; ref; ref = ref->next) {
|
||||
if (!is_null_oid(&ref->new_oid))
|
||||
strvec_pushf(&child.args, "--negotiation-tip=%s", oid_to_hex(&ref->new_oid));
|
||||
}
|
||||
strvec_push(&child.args, url);
|
||||
|
||||
if (start_command(&child))
|
||||
|
||||
Reference in New Issue
Block a user