setup.c: support multi-checkout repo setup
[gitweb.git] / upload-pack.c
index c9ea1d3be668f9beeac408dfdf5ceea90c4a6ca8..ac9ac1592d818da5ae90ec065581e3bf218ffc39 100644 (file)
@@ -166,7 +166,9 @@ static void create_pack_file(void)
                if (!pollsize)
                        break;
 
-               ret = poll(pfd, pollsize, 1000 * keepalive);
+               ret = poll(pfd, pollsize,
+                       keepalive < 0 ? -1 : 1000 * keepalive);
+
                if (ret < 0) {
                        if (errno != EINTR) {
                                error("poll failed, resuming: %s",
@@ -742,7 +744,7 @@ static int find_symref(const char *refname, const unsigned char *sha1, int flag,
 
        if ((flag & REF_ISSYMREF) == 0)
                return 0;
-       symref_target = resolve_ref_unsafe(refname, unused, 0, &flag);
+       symref_target = resolve_ref_unsafe(refname, 0, unused, &flag);
        if (!symref_target || (flag & REF_ISSYMREF) == 0)
                die("'%s' is a symref but it is not?", refname);
        item = string_list_append(cb_data, refname);