send-pack.c: use is_null_sha1()
Everybody else uses is_null_sha1() -- there is no point to have its own is_zero_sha1() anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Dec 31, 2006 at 00:59 UTC
4b4ee90e587779233488325d2832a946eebe03e0
1 file changed
+1
-12
send-pack.c
+1
-12
@@ -14,17 +14,6 @@ static int send_all;
14
static int force_update;
15
static int use_thin_pack;
16
17
-static int is_zero_sha1(const unsigned char *sha1)
18
-{
19
- int i;
20
-
21
- for (i = 0; i < 20; i++) {
22
- if (*sha1++)
23
- return 0;
24
- }
25
- return 1;
26
-}
27
-
17
static void exec_pack_objects(void)
18
{
19
static const char *args[] = {
@@ -338,7 +327,7 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
327
328
if (!force_update &&
329
!delete_ref &&
341
- !is_zero_sha1(ref->old_sha1) &&
330
+ !is_null_sha1(ref->old_sha1) &&
331
!ref->force) {
332
if (!has_sha1_file(ref->old_sha1) ||
333
!ref_newer(ref->peer_ref->new_sha1,