Closed halostatue closed 2 weeks ago
chezmoi uses the SHA256 of the config file template's content only. You can see this with:
$ chezmoi state get-bucket --bucket=configState
{
"configState": {
"configTemplateContentsSHA256": "ad7d2ed6ea1091fd5aeeb14110eda687fd2563b87d3a82ece16ff46463288dc7"
}
}
I haven’t seen it since I opened this, but I know that I’ve seen it in cases where (a) I haven’t updated the inputs to the templates (my .chezmoi.toml.tmpl
is probably more complex than it needs to be, but I don’t currently know the best way to simplify it, because I want my template resolution more data driven than hard-coded) and (b) I haven’t updated .chezmoi.toml.tmpl
itself. There’s something going on, but I’ll need to throw some debugging in when I see this again.
Have you seen this issue again? If not, would you mind closing this issue and re-opening it when you do see the issue again?
No sooner than I close this and I get the message again.
modified: Setup/Gobin
modified: home/.chezmoiignore
modified: home/.chezmoiscripts/run_onchange_after_install-4-gobin.sh.tmpl
renamed: home/private_Library/Application Support/lazygit/config.yml -> home/.chezmoitemplates/lazygit_config.yml.tmpl
new file: home/.chezmoitemplates/programs.tmpl
new file: home/private_Library/Application Support/lazygit/config.yml.tmpl
modified: home/private_dot_config/brew/config.fish.tmpl
modified: home/private_dot_config/brew/config.sh.tmpl
modified: home/private_dot_config/git/aliases.tmpl
modified: home/private_dot_config/git/attributes.tmpl
modified: home/private_dot_config/git/diff-merge.tmpl
new file: home/private_dot_config/lazygit/config.yml.tmpl
modified: home/private_dot_config/nvim/lua/plugins/syntax.lua
modified: home/private_dot_gitconfig.tmpl
modified: home/private_dot_gpg-agent.conf.tmpl
modified: home/private_dot_ssh/private_config.tmpl
modified: home/private_dot_vim/config/plugins.vim
So, the only thing that I figure that changed which could have triggered this is home/.chezmoiignore
.
Any ideas before I add some debugging to understand this?
Any ideas before I add some debugging to understand this?
I don't know, sorry. The relevant code is here.
Ok. I’m going to close this again for now because I did have some changes to make last night after this. Once that’s done, I’ll see if it happens again and add some debugging.
Describe the bug
I’m not entirely sure why, but it looks like I’m seeing fairly frequent reports that
config file template has changed
when I have made no change to$CHEZMOI_SOURCE_DIR/.chezmoi.toml.tmpl
.To reproduce
Unclear as yet. I plan on investigating, but am opening this for tracking.
Expected behavior
config file template has changed
should only appear when.chezmoi.toml.tmpl
has changed on disk. I’m not sure where / how this particular state piece is being kept, but it feels (no evidence any direction) that this is purely on a date comparison, not a date comparison + hash comparison.Output of
chezmoi doctor