aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-31 00:59:53 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-31 00:59:53 -0800
commit4b4ee90e587779233488325d2832a946eebe03e0 (patch)
treec87d24f0640b868fc5be5804d1ccffbb1a81ef96
parent87a3d29f460701bf6fc1f34419290cad658c11a2 (diff)
downloadgit-4b4ee90e587779233488325d2832a946eebe03e0.tar.gz
git-4b4ee90e587779233488325d2832a946eebe03e0.tar.xz
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>
-rw-r--r--send-pack.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/send-pack.c b/send-pack.c
index 54de96e40..29cf73681 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -14,17 +14,6 @@ static int send_all;
static int force_update;
static int use_thin_pack;
-static int is_zero_sha1(const unsigned char *sha1)
-{
- int i;
-
- for (i = 0; i < 20; i++) {
- if (*sha1++)
- return 0;
- }
- return 1;
-}
-
static void exec_pack_objects(void)
{
static const char *args[] = {
@@ -338,7 +327,7 @@ static int send_pack(int in, int out, int nr_refspec, char **refspec)
if (!force_update &&
!delete_ref &&
- !is_zero_sha1(ref->old_sha1) &&
+ !is_null_sha1(ref->old_sha1) &&
!ref->force) {
if (!has_sha1_file(ref->old_sha1) ||
!ref_newer(ref->peer_ref->new_sha1,