gitzone

git-based zone management tool for static and dynamic domains
git clone https://git.parazyd.org/gitzone
Log | Files | Refs

commit 677e392007fab53e595c43d29293613a0ce710e4
parent a5377a84d1283f8937a5214f3c40d214de219b42
Author: tg(x) <*@tg-x.net>
Date:   Mon, 14 Feb 2011 07:25:09 +0100

use git show for initial commit

Diffstat:
Mbin/gitzone | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 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;