summaryrefslogtreecommitdiff
path: root/builtin/tag.c
diff options
context:
space:
mode:
authorLibravatar Jonathan Nieder <jrnieder@gmail.com>2017-11-20 13:22:54 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-21 14:01:02 +0900
commit8e349780ecb9bcec52c7df22fcbfb4afd0d7936c (patch)
tree5fb040204fb6d89cd332a8fdc77231f98f8db9b2 /builtin/tag.c
parentssh test: make copy_ssh_wrapper_as clean up after itself (diff)
downloadtgif-8e349780ecb9bcec52c7df22fcbfb4afd0d7936c.tar.xz
connect: move no_fork fallback to git_tcp_connect
git_connect has the structure struct child_process *conn = &no_fork; ... switch (protocol) { case PROTO_GIT: if (git_use_proxy(hostandport)) conn = git_proxy_connect(fd, hostandport); else git_tcp_connect(fd, hostandport, flags); ... break; case PROTO_SSH: conn = xmalloc(sizeof(*conn)); child_process_init(conn); argv_array_push(&conn->args, ssh); ... break; ... return conn; In all cases except the git_tcp_connect case, conn is explicitly assigned a value. Make the code clearer by explicitly assigning 'conn = &no_fork' in the tcp case and eliminating the default so the compiler can ensure conn is always correctly assigned. Noticed-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/tag.c')
0 files changed, 0 insertions, 0 deletions