summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortg(x) <*@tg-x.net>2013-06-01 09:21:27 (GMT)
committer tg(x) <*@tg-x.net>2013-06-05 16:39:53 (GMT)
commitc71483d17b39d0e602d585375743954e5cd5a2b6 (patch)
tree9c0ec42a2cb6178c4959981226082f0518389bfb
parent27a3a6e8d34db5d801d7987ecf6cfa5ba9efe254 (diff)
fixed diff for initial commit
-rwxr-xr-xbin/gitzone8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/gitzone b/bin/gitzone
index c58c43a..2f355f5 100755
--- a/bin/gitzone
+++ b/bin/gitzone
@@ -122,9 +122,11 @@ sub check_what_changed {
my ($old, $new) = @_;
# diff with empty tree if there's no previous commit
- $old = '4b825dc642cb6eb9a060e54bf8d69288fbee4904' if !$old || $old =~ /^0+$/;
-
- $_ = git "diff --raw ". ($new ? "$old..$new" : $old);
+ if (!$old || $old =~ /^0+$/) {
+ $_ = git "diff-tree --root $new";
+ } else {
+ $_ = git "diff --raw --abbrev=40 ". ($new ? "$old..$new" : $old);
+ }
# parse diff output, add only valid zone names to %files for parsing
$files{$1} = 0 while m,^:(?:[\w.]+\s+){5}([a-z0-9./-]+)$,gm;