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

Extend re-add command to add new files #3776

Open
eugenesvk opened this issue May 25, 2024 · 4 comments
Open

Extend re-add command to add new files #3776

eugenesvk opened this issue May 25, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@eugenesvk
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Following #3142 I've switched from add to re-add to not break encrypted files

However, re-add can't add new files, so you get not managed error and have to remember again that there is a difference between add and re-add

Describe the solution you'd like

I'd like to have just one command that can handle both cases, so some kind of option/flag that asks re-add to also be able to add new files would be great!

Describe alternatives you've considered

Not sure, thought about maybe checking the error message in an aliased launcher and relaunch the same command with add instead
Or maybe checking if a file is managed beforehand

But that seems too brittle

Additional context

N/a

@eugenesvk eugenesvk added the enhancement New feature or request label May 25, 2024
@twpayne
Copy link
Owner

twpayne commented Oct 7, 2024

Just a quick note on this. This makes most sense with exact_ directories, where chezmoi manages all files in a directory, including the deletion of unmanaged files.

@twpayne twpayne added the duplicate This issue or pull request already exists label Oct 14, 2024
@twpayne
Copy link
Owner

twpayne commented Oct 14, 2024

This is actually a dup of #2298.

@twpayne twpayne closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
@eugenesvk
Copy link
Contributor Author

Doesn't seem like a dupe, I don't want to add the whole directory, only a specific file. In my case there is no chezmoi add ~/zack_setup_env initial adding step

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2024
@twpayne twpayne reopened this Oct 28, 2024
Repository owner unlocked this conversation Oct 28, 2024
@twpayne twpayne removed the duplicate This issue or pull request already exists label Nov 8, 2024
@twpayne
Copy link
Owner

twpayne commented Nov 9, 2024

Doesn't seem like a dupe, I don't want to add the whole directory, only a specific file. In my case there is no chezmoi add ~/zack_setup_env initial adding step

You're right. I misunderstood the issues and undid the dupe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants