Merge branch 'dl/complete-cherry-pick-revert-skip'
[gitweb.git] / credential-cache.c
index 3cbd4200190dd9d8378f5a111883de026b06e47d..1cccc3a0b9cfb2a14e9c87d5afc29234fa62adc4 100644 (file)
@@ -25,7 +25,7 @@ static int send_request(const char *socket, const struct strbuf *out)
                int r;
 
                r = read_in_full(fd, in, sizeof(in));
-               if (r == 0)
+               if (r == 0 || (r < 0 && errno == ECONNRESET))
                        break;
                if (r < 0)
                        die_errno("read error from cache daemon");
@@ -87,7 +87,7 @@ static char *get_socket_path(void)
 {
        struct stat sb;
        char *old_dir, *socket;
-       old_dir = expand_user_path("~/.git-credential-cache");
+       old_dir = expand_user_path("~/.git-credential-cache", 0);
        if (old_dir && !stat(old_dir, &sb) && S_ISDIR(sb.st_mode))
                socket = xstrfmt("%s/socket", old_dir);
        else