Use the ours
strategy OPTION rather than the ours
strategy
#37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The new Python bot sometimes discards changes in its merge commits. Currently this is preventing the download counts from working (see #36); web hooks are also broken (see #33), maybe for the same reason, maybe with some additional complexity mixed in (will find out when we see whether this fixes it).
Cause
Git has some very confusing syntax relating to merge strategies. The user can override the merge strategy, and/or provide options for a merge strategy, and the
ours
keyword is allowed in both places!!!We want this one (and used it historically in the Perl bot):
https://git-scm.com/docs/git-pull
However, the Python bot currently uses this one:
This causes every
pull
that happens in the system to discard any changes that were added by another container!Changes
Now the Python bot uses the
ours
strategy option instead of the strategy, as intended. This will make it stop discarding changes.To accomplish this, we need to switch from the
strategy
parameter to thestrategy-option
parameter.In gitpython this is accomplished with an underscore in place of the dash:
Fixes #36. May fix #33, not sure about that one.