diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-04-12 17:55:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-12 17:56:25 -0700 |
commit | 7d5a1806e8c2d9980938a05a56939272ad2ec338 (patch) | |
tree | 6a09da6a7a0d76a3bf1fc0f2d860349c6efe1de9 /builtin-fetch-pack.c | |
parent | t1301-shared-repo: fix forced modes test (diff) | |
parent | GIT 1.6.3-rc0 (diff) | |
download | tgif-7d5a1806e8c2d9980938a05a56939272ad2ec338.tar.xz |
Mark t1301 permission test to depend on POSIXPERM
This prepares the topic for inclusion to master.
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r-- | builtin-fetch-pack.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 67fb80ec48..5d134be47c 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -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) @@ -606,7 +605,7 @@ static struct ref *do_fetch_pack(int fd[2], /* When cloning, it is not unusual to have * no common commit. */ - fprintf(stderr, "warning: no common commits\n"); + warning("no common commits"); if (get_pack(fd, pack_lockfile)) die("git fetch-pack: fetch failed."); @@ -801,15 +800,13 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args, int fd; mtime.sec = st.st_mtime; -#ifdef USE_NSEC - mtime.usec = st.st_mtim.usec; -#endif + mtime.nsec = ST_MTIME_NSEC(st); if (stat(shallow, &st)) { if (mtime.sec) die("shallow file was removed during fetch"); } else if (st.st_mtime != mtime.sec #ifdef USE_NSEC - || st.st_mtim.usec != mtime.usec + || ST_MTIME_NSEC(st) != mtime.nsec #endif ) die("shallow file was changed during fetch"); |