]> git.ipfire.org Git - thirdparty/git.git/commit - credential-cache--daemon.c
credential-cache--daemon: refactor check_socket_directory
authorJon Griffiths <jon_p_griffiths@yahoo.com>
Tue, 23 Feb 2016 07:15:15 +0000 (02:15 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 23 Feb 2016 20:56:26 +0000 (12:56 -0800)
commita6e5e2864f96ebce9ec6656841c8965bcdf1b37f
tree0afda1518a217c67b7691f6ab357ba9136d103b8
parent326e5bc91eecf73234ead29636207bc516573e79
credential-cache--daemon: refactor check_socket_directory

This function does an early return, and therefore has to
repeat its cleanup. We can stick the later bit of the
function into an "else" and avoid duplicating the shared
part (which will get bigger in a future patch).

Let's also rename the function to init_socket_directory. It
not only checks the directory but also creates it. Saying
"init" is more accurate.

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
credential-cache--daemon.c