Skip to content

Commit

Permalink
send-pack.c: use is_null_sha1()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Dec 31, 2006
1 parent 87a3d29 commit 4b4ee90
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions send-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4b4ee90

Please sign in to comment.