make oneline reflog dates more consistent with multiline format
[gitweb.git] / builtin-fetch-pack.c
index 1d7e02326f5d0da5533ef92c3b1b31c61cef9758..d571253a56c80e0b644b220c870b27726c8f3dfc 100644 (file)
@@ -216,9 +216,8 @@ static int find_common(int fd[2], unsigned char *result_sha1,
        if (args.depth > 0) {
                char line[1024];
                unsigned char sha1[20];
-               int len;
 
-               while ((len = packet_read_line(fd[0], line, sizeof(line)))) {
+               while (packet_read_line(fd[0], line, sizeof(line))) {
                        if (!prefixcmp(line, "shallow ")) {
                                if (get_sha1_hex(line + 8, sha1))
                                        die("invalid shallow line: %s", line);
@@ -483,7 +482,7 @@ static int sideband_demux(int fd, void *data)
 {
        int *xd = data;
 
-       return recv_sideband("fetch-pack", xd[0], fd, 2);
+       return recv_sideband("fetch-pack", xd[0], fd);
 }
 
 static int get_pack(int xd[2], char **pack_lockfile)
@@ -807,7 +806,7 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
                                die("shallow file was removed during fetch");
                } else if (st.st_mtime != mtime.sec
 #ifdef USE_NSEC
-                               || ST_CTIME_NSEC(st) != mtime.nsec
+                               || ST_MTIME_NSEC(st) != mtime.nsec
 #endif
                          )
                        die("shallow file was changed during fetch");