summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-05-17 15:51:58 -0400
committerJoey Hess <joeyh@joeyh.name>2016-05-17 15:51:58 -0400
commit80c4ec7c5a0c1927977783872404bf259da09bd9 (patch)
treed511c3b8436494166d092b72a21fa5c9f74b215d
parent9d0f63c6d37aab842e4d62419f6de0f359d4dbdb (diff)
parentdf9d7b407c3562d8f279d9d9dbd2e81be1e3bf51 (diff)
Merge branch 'master' of ssh://etckeeper.branchable.com
-rw-r--r--doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS.mdwn41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS.mdwn b/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS.mdwn
new file mode 100644
index 0000000..da2f113
--- /dev/null
+++ b/doc/todo/Give_preference_to_etckeeper.conf_over_existing_repository_for_defining___36__VCS.mdwn
@@ -0,0 +1,41 @@
+I'm using etckeeper with hg and I will use git to manage some files under /etc apart from etckeeper for some reason.
+
+However, after I initialize new git repository as /etc/.git, etckeeper starts to use git as $VCS contrary to definition in etckeeper.conf. So I think that definition in etckeeper.conf should be given priority over existing repository.
+
+The patch is below (from https://github.com/hiraku/etckeeper/commit/02f6d37e50cacddc9605dcbc5c8844b3f4658d6e ):
+
+```diff
+diff --git a/etckeeper b/etckeeper
+index 93f2b00..6c63ffb 100755
+--- a/etckeeper
++++ b/etckeeper
+@@ -109,14 +109,16 @@ fi
+ cd "$ETCKEEPER_DIR"
+ export ETCKEEPER_DIR
+
+-if [ -d ".git" ]; then
+- VCS=git
+-elif [ -d ".hg" ]; then
+- VCS=hg
+-elif [ -d "_darcs" ]; then
+- VCS=darcs
+-elif [ -d ".bzr" ]; then
+- VCS=bzr
++if [ -z "$VCS" ]; then
++ if [ -d ".git" ]; then
++ VCS=git
++ elif [ -d ".hg" ]; then
++ VCS=hg
++ elif [ -d "_darcs" ]; then
++ VCS=darcs
++ elif [ -d ".bzr" ]; then
++ VCS=bzr
++ fi
+ fi
+
+ if [ -z "$VCS" ]; then
+```
+
+I would appreciate your consideration.
+
+Thank you.