Branch: Tag:

2010-10-04

2010-10-04 14:10:46 by Marcus Comstedt <marcus@mc.pp.se>

Only check each commit once in the recieve hook.

524:   {    inherit CommitHookUtilsRepo;    +  static array(string) commits_to_check = ({}); +     int check_tag_push(string old_sha, string new_sha, string ref_name)    {    string oldtag =
551:    return 1;    }    -  foreach(split_lf(run_git("rev-list", old_sha+".."+new_sha)), string sha) -  if(check_commit(sha)) -  return 1; +  commits_to_check += split_lf(run_git("rev-list", old_sha+".."+new_sha));    return 0;    }    }
579:    if(check_push(@args))    return 1;    } +  foreach(Array.uniq(commits_to_check), string sha) +  if(check_commit(sha)) +  return 1;    return 0;    }   }