Merge branch 'jk/fix-proto-downgrade-to-v0'

Transports that do not support protocol v2 did not correctly fall
back to protocol v0 under certain conditions, which has been
corrected.

* jk/fix-proto-downgrade-to-v0:
  git_connect(): fix corner cases in downgrading v2 to v0
This commit is contained in:
Junio C Hamano
2023-03-28 10:51:52 -07:00
7 changed files with 47 additions and 13 deletions

View File

@@ -213,8 +213,8 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
int flags = args.verbose ? CONNECT_VERBOSE : 0;
if (args.diag_url)
flags |= CONNECT_DIAG_URL;
conn = git_connect(fd, dest, args.uploadpack,
flags);
conn = git_connect(fd, dest, "git-upload-pack",
args.uploadpack, flags);
if (!conn)
return args.diag_url ? 0 : 1;
}