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

Show difference between source and destination file #91

Closed
stfnx opened this issue Feb 11, 2022 · 1 comment · Fixed by #117
Closed

Show difference between source and destination file #91

stfnx opened this issue Feb 11, 2022 · 1 comment · Fixed by #117

Comments

@stfnx
Copy link

stfnx commented Feb 11, 2022

Dotter version: 0.12.9

Some of my configuration files are using templates.
I know that they are generated to .dotter/cache and then copied to the target location.
This works fine.

But sometimes the target file changes. In this case I get the following error message:

[ERROR] Updating template "sublime-text/settings.json" -> "/home/stfnx/.config/sublime-text/Packages/User/Preferences.sublime-settings" but target contents were changed. Skipping.
[ERROR] Some files were skipped. To ignore errors and overwrite unexpected target files, use the --force flag.

This is totally understandable and the desired behavior.
But how am I supposed to get the changes in the target file back to my template?

I could do it manually using diff:

diff ~/dotfiles/.dotter/cache/sublime-text/settings.json ~/.config/sublime-text/Packages/User/Preferences.sublime-settings

Sure this does work but it is cumbersome and a lot to type.

When running dotter --help I can see a --diff-context-lines option.
This gave me the impression that there must be a diff option baked into dotter.
But I couldn't find it...

Does dotter have a diff option? If not, is it planned?
Is there an easier way to do it?

@stfnx stfnx added the question label Feb 11, 2022
@SuperCuber
Copy link
Owner

This has been planned but I don't have the time to work on this nowadays - PRs are appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants