summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2011-02-14 06:25:09 (GMT)
committer tg(x) <*@tg-x.net>2013-06-05 15:58:40 (GMT)
commit677e392007fab53e595c43d29293613a0ce710e4 (patch)
treef7691fa96b60cda11ca6ab90f7389815c474566f
parenta5377a84d1283f8937a5214f3c40d214de219b42 (diff)
use git show for initial commit
-rwxr-xr-xbin/gitzone6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/gitzone b/bin/gitzone
index d7c164b..cb5fd86 100755
--- a/bin/gitzone
+++ b/bin/gitzone
@@ -232,7 +232,11 @@ sub pre_receive {
# check what changed
git "checkout -qf $new";
- $_ = git "diff --raw $old..$new";
+ if ($old =~ /^0+$/) {
+ $_ = git "show --raw $new";
+ } else {
+ $_ = git "diff --raw $old..$new";
+ }
# parse diff output, add only valid zone names to %files for parsing
$files{$1} = 0 while m,^:(?:[\w.]+\s+){5}([a-z0-9./-]+)$,gm;