Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-repo external and umask don't play nice #4214

Open
hugoh opened this issue Jan 18, 2025 · 1 comment
Open

git-repo external and umask don't play nice #4214

hugoh opened this issue Jan 18, 2025 · 1 comment
Labels
investigating This is a bit weird, not sure if this is a bug yet

Comments

@hugoh
Copy link

hugoh commented Jan 18, 2025

Describe the bug

With umask = 0o077, a git-repo external refresh always believes that the destination copy has changed.

To reproduce

I have the following external defined:

[".vim/pack/chezmoi/start/chezmoi.vim"]
  type = "git-repo"
  url = "https://github.com/alker0/chezmoi.vim.git"
  refreshPeriod = "168h"
  clone.args = ["--depth", "1"]
  pull.args = ["--ff-only"]

With the following in the config:

umask = 0o077

cm apply -R .vim/pack/chezmoi/start/chezmoi.vim will always say: .vim/pack/chezmoi/start/chezmoi.vim has changed since chezmoi last wrote it?:

~ ❯ chezmoi apply -R .vim/pack/chezmoi/start/chezmoi.vim 
.vim/pack/chezmoi/start/chezmoi.vim has changed since chezmoi last wrote it? overwrite/all-overwrite/skip/quit

Overwriting and running it again will produce the same outcome again.

Removing the umask setting fixes the problem.

Expected behavior

~ ❯ chezmoi apply -R .vim/pack/chezmoi/start/chezmoi.vim 
Already up to date.

Output of command with the --verbose flag

Same.

@twpayne twpayne added the investigating This is a bit weird, not sure if this is a bug yet label Jan 20, 2025
@twpayne
Copy link
Owner

twpayne commented Jan 20, 2025

I'm unable to reproduce this.

What is the output of:

chezmoi apply --debug ~/.vim/pack/chezmoi/start/chezmoi.vim

and:

chezmoi managed | grep chezmoi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating This is a bit weird, not sure if this is a bug yet
Projects
None yet
Development

No branches or pull requests

2 participants