Skip to content

Conversation

@goerz
Copy link

@goerz goerz commented Oct 20, 2019

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.

If the --command flag is used, the given command runs after syncing,
but before committing. If the command removes any files that were
"added" by the syncing, or re-creates files that were "removed" during
the syncing, then the "git add" and "git rm" commands 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 goerz force-pushed the double_check_commit branch from baf2cdd to 6fdf9b9 Compare October 20, 2019 06:23
@goerz
Copy link
Author

goerz commented Oct 20, 2019

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.

@asmeurer
Copy link
Member

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants