githelper.git/
githelper.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2010-10-04
2010-10-04 14:10:46 by Marcus Comstedt <marcus@mc.pp.se>
4594fa72a5e7441fa9713f316e5b8d92fe4a313b (
10
lines) (+
7
/-
3
)
[
Show
|
Annotate
]
Branch:
master
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; } }