X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FTree%2FSnapshot.pm;fp=lib%2FFile%2FTree%2FSnapshot.pm;h=ec356d4593a72933a59802cf60c95ef0f28ffaa6;hb=aff04a36b6f3fb287ef6e325b7eb80327774d2a5;hp=43b3bfa317be61f57ac877a88aa2815eb110bfca;hpb=7bc8589289e8fdc7fc5ace49783d292fe93b1588;p=scpubgit%2FFile-Tree-Snapshot.git diff --git a/lib/File/Tree/Snapshot.pm b/lib/File/Tree/Snapshot.pm index 43b3bfa..ec356d4 100644 --- a/lib/File/Tree/Snapshot.pm +++ b/lib/File/Tree/Snapshot.pm @@ -85,6 +85,8 @@ sub commit { sub reset { my ($self) = @_; $self->_git_exec('add .'); + return 1 + unless $self->_has_changes; $self->_git_exec('checkout -f'); return 1; }