summaryrefslogtreecommitdiff
path: root/pre-commit.d/30store-metadata
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-03-29 13:45:56 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-03-29 13:45:56 -0400
commit16f1f1b45f5642fee8c4a5c942c8c9f754d08817 (patch)
treec257f189383a79ba994e052ce154cf83430ad614 /pre-commit.d/30store-metadata
parente07e7afa0fbfbe57c2412225beb5c271cefc199c (diff)
releasing version 0.14
Diffstat (limited to 'pre-commit.d/30store-metadata')
-rwxr-xr-xpre-commit.d/30store-metadata8
1 files changed, 7 insertions, 1 deletions
diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata
index ec0c691..bed2d89 100755
--- a/pre-commit.d/30store-metadata
+++ b/pre-commit.d/30store-metadata
@@ -56,7 +56,13 @@ generate_metadata() {
if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then
if [ -f .metadata ]; then
# remove obsolete .metadata file
- $VCS rm .metadata
+ # git allows fully deleting it at this point, other VCS
+ # may not (the repo is locked for hg).
+ if [ "$VCS" = git ]; then
+ $VCS rm .metadata
+ else
+ rm -f .metadata
+ fi
fi
echo "# Generated by etckeeper. Do not edit." > .etckeeper