From ffb6e06214dba9257a322286cbdaabfd40be3a59 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 17 Jul 2016 18:53:46 -0400 Subject: Make etckeeper commit store metadata changes. The pre-commit hook has always (and continues) to do that, but pre-commit is only run when there are changes to tommit. This makes metadata-only changes get committed. Note that the reason the pre-commit hook continues to also store metadata changes is to support manual git commit run in /etc. --- commit.d/20store-metadata | 1 + debian/changelog | 9 +++++++++ doc/todo/metadata_changes_don__39__t_cause_a_new_commit.mdwn | 2 ++ 3 files changed, 12 insertions(+) create mode 120000 commit.d/20store-metadata diff --git a/commit.d/20store-metadata b/commit.d/20store-metadata new file mode 120000 index 0000000..5698d64 --- /dev/null +++ b/commit.d/20store-metadata @@ -0,0 +1 @@ +../pre-commit.d/30store-metadata \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index bfbf713..36521e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +etckeeper (1.18.5) UNRELEASED; urgency=medium + + * Make etckeeper commit store metadata changes. The pre-commit + hook has always (and continues) to do that, but pre-commit is only + run when there are changes to tommit. This makes metadata-only + changes get committed. + + -- Joey Hess Sun, 17 Jul 2016 18:45:18 -0400 + etckeeper (1.18.4) unstable; urgency=medium * Optimised find for special and hard linked files. diff --git a/doc/todo/metadata_changes_don__39__t_cause_a_new_commit.mdwn b/doc/todo/metadata_changes_don__39__t_cause_a_new_commit.mdwn index 5d4c9db..ad1813a 100644 --- a/doc/todo/metadata_changes_don__39__t_cause_a_new_commit.mdwn +++ b/doc/todo/metadata_changes_don__39__t_cause_a_new_commit.mdwn @@ -3,3 +3,5 @@ If the only changes in /etc are metadata changes that the VCS doesn't natively t This is because the metadata in `/etc/.etckeeper` is only updated from `etckeeper pre-commit`, which is only called by the VCS pre-commit hook; and since the VCS doesn't track the metadata changes, it doesn't think that a new commit needs to be made, and doesn't call the hook! I think the best solution might be to call `etckeeper pre-commit` from in `etckeeper commit`. + +> [[fixed|done]] --[[Joey]] -- cgit v1.2.3