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

Chezmoi diff is different from chezmoi apply diff #3523

Open
dgudim opened this issue Jan 29, 2024 · 3 comments
Open

Chezmoi diff is different from chezmoi apply diff #3523

dgudim opened this issue Jan 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dgudim
Copy link

dgudim commented Jan 29, 2024

I have changed chezmoi's diff in the config file to delta.

[diff]
    command = "delta"
    exclude = ["scripts"]
    args = ["--pager=0", "{{`{{ .Destination }}`}}", "{{`{{ .Target }}`}}"]

chezmoi diff does what I expect

image

However, during chezmoi apply there is an option to view diff of a file if it was changed externally, and that is still using the default diff. Can I somehow change that?

image

@dgudim dgudim added the support Support request label Jan 29, 2024
@halostatue
Copy link
Collaborator

I don't think that this exists right now.

@twpayne twpayne added bug Something isn't working and removed support Support request labels Jan 29, 2024
@twpayne
Copy link
Owner

twpayne commented Jan 29, 2024

Thanks for reporting this. diff.command should be used by the prompt in chezmoi apply and it's a bug that it's not.

@twpayne
Copy link
Owner

twpayne commented Jan 29, 2024

In the short term you can work around this by adding:

[diff]
    pager = "delta"

to your config file (this is in addition to diff.command being set to delta).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants