Skip to content

Commit

Permalink
Add FAQ entry on source/target filename bijection
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Sep 30, 2019
1 parent 681116a commit f2cd6e9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/FAQ.md
Expand Up @@ -6,6 +6,7 @@
* [If there's a mechanism in place for the above, is there also a way to tell chezmoi to ignore specific files or groups of files (e.g. by directory name or by glob)?](#if-theres-a-mechanism-in-place-for-the-above-is-there-also-a-way-to-tell-chezmoi-to-ignore-specific-files-or-groups-of-files-eg-by-directory-name-or-by-glob)
* [If the target already exists, but is "behind" the source, can chezmoi be configured to preserve the target version before replacing it with one derived from the source?](#if-the-target-already-exists-but-is-behind-the-source-can-chezmoi-be-configured-to-preserve-the-target-version-before-replacing-it-with-one-derived-from-the-source)
* [I've made changes to both the destination state and the source state that I want to keep. How can I keep them both?](#ive-made-changes-to-both-the-destination-state-and-the-source-state-that-i-want-to-keep-how-can-i-keep-them-both)
* [chezmoi's source file naming system cannot handle all possible filenames](#chezmois-source-file-naming-system-cannot-handle-all-possible-filenames)
* [gpg encryption fails. What could be wrong?](#gpg-encryption-fails-what-could-be-wrong)
* [What inspired chezmoi?](#what-inspired-chezmoi)
* [Can I use chezmoi outside my home directory?](#can-i-use-chezmoi-outside-my-home-directory)
Expand Down Expand Up @@ -51,6 +52,24 @@ diff`.
state, target state, and destination state. Copy the changes you want to keep in
to the source state.

## chezmoi's source file naming system cannot handle all possible filenames

This is correct. Certain target filenames, for example `~/dot_example`, are
incompatible with chezmoi's
[attributes](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#source-state-attributes)
used in the source state.

This is a deliberate, practical compromise. Target state metadata (private,
encrypted, etc.) need to be stored for each file. Using the source state
filename for this means that the contents of the file are untouched, there is no
need to maintain the metadata in a separate file, is independent of the
underlying filesystem and version control system, and unambiguously associates
the metadata with a single file.

In practice, dotfile filenames are unlikely to conflict with chezmoi's
attributes. If this does cause a genuine problem for you, please [open an
issue on GitHub](https://github.com/twpayne/chezmoi/issues/new).

## gpg encryption fails. What could be wrong?

The `gpg.recipient` key should be ultimately trusted, otherwise encryption will
Expand Down

0 comments on commit f2cd6e9

Please sign in to comment.