From: Robert 'phaylon' Sedlacek <r.sedlacek@shadowcat.co.uk>
Date: Tue, 12 Jun 2012 21:06:29 +0000 (+0000)
Subject: use porcelain status output from git instead of diff, since diff fails on 1.7.2.5... 
X-Git-Tag: v0.000001~6
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e47d4988071c1568bdb83fcbabe963b2cd5c52f3;p=scpubgit%2FFile-Tree-Snapshot.git

use porcelain status output from git instead of diff, since diff fails on 1.7.2.5 when there's no master
---

diff --git a/lib/File/Tree/Snapshot.pm b/lib/File/Tree/Snapshot.pm
index 005a7c9..3962e21 100644
--- a/lib/File/Tree/Snapshot.pm
+++ b/lib/File/Tree/Snapshot.pm
@@ -63,7 +63,7 @@ sub create {
 sub _has_changes {
     my ($self) = @_;
     my $path = $self->storage_path;
-    my $cmd = qq{cd $path && git diff --name-only --cached};
+    my $cmd = qq{cd $path && git status --porcelain};
     CORE::open my $handle, '-|', $cmd
       or die "Unable to find changes in ($cmd): $!\n";
     my @changes = <$handle>;