Currently, according to the README, you have to call 'etckeeper init' by hand after a 'git checkout' to restore metadata. It would be very handy to do that using a post-checkout hook. post-merge might also be a good idea.
Maximilian Gass wrote: For the post-checkout hook, it would need to avoid doing anything if git-checkout had been used to checkout a file, rather than a branch. The problem with doing it post-merge is that it would wipe out any uncommitted metadata changes that are in the tree from before the merge.
Maybe the hooks should just execute .etckeeper to restore permissions instead of the whole 'etckeeper init' procedure.
According to githooks(5), the post-checkout is passed a flag indicating whether the checkout was a branch checkout or a file checkout.