doctr icon indicating copy to clipboard operation
doctr copied to clipboard

Double check if files still exist before git-add

Open goerz opened this issue 4 years ago • 2 comments

I figured out the problem I was having in #353 with deleting files from the deploy directory via a custom --command: The command runs after syncing, but before committing. Thus, if the command removes any files that were "added" by the syncing, then the "git add" during the commit will fail.

To get around this, we can just double check if "added" files are still there before calling "git add", respectively "removed" files are still deleted. If there are any changes to the status after the sync, a warning seems appropriate.

goerz avatar Oct 20 '19 06:10 goerz

The CI failures do not seem to be related to my patch, cf. the docs-only PR #356 also failing. Let me know if there's anything I should do.

goerz avatar Oct 20 '19 07:10 goerz

Yeah, there are some fixes I need to do for the tests. I haven't had the time to work on doctr in awhile unfortunately.

asmeurer avatar Oct 21 '19 20:10 asmeurer