projects
/
scpubgit/File-Tree-Snapshot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
only roll back if there are changes
[scpubgit/File-Tree-Snapshot.git]
/
lib
/
File
/
Tree
/
Snapshot.pm
diff --git
a/lib/File/Tree/Snapshot.pm
b/lib/File/Tree/Snapshot.pm
index
43b3bfa
..
ec356d4
100644
(file)
--- 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;
}