projects
/
scpubgit/File-Tree-Snapshot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
7bc8589
)
only roll back if there are changes
Robert 'phaylon' Sedlacek [Tue, 12 Jun 2012 19:52:20 +0000 (19:52 +0000)]
lib/File/Tree/Snapshot.pm
patch
|
blob
|
blame
|
history
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;
}