Added --assume-in-merge option for check-merge-conflict#301
Merged
asottile merged 1 commit intopre-commit:masterfrom Jun 26, 2018
vinayinvicible:force-merge
Merged
Added --assume-in-merge option for check-merge-conflict#301asottile merged 1 commit intopre-commit:masterfrom vinayinvicible:force-merge
asottile merged 1 commit intopre-commit:masterfrom
vinayinvicible:force-merge
Conversation
asottile
approved these changes
Jun 26, 2018
| args = parser.parse_args(argv) | ||
|
|
||
| if not is_in_merge(): | ||
| if not is_in_merge(args): |
Member
There was a problem hiding this comment.
probably can leave is_in_merge alone and just do:
if not is_in_merge() and not args.assume_in_merge:
return 0(oops, sorry, let's also change the argument to --assume-in-merge now that I'm reading the code /o\)
asottile
reviewed
Jun 26, 2018
| assert detect_merge_conflict(['README.md']) == 0 | ||
| f = tmpdir.join('README.md') | ||
| f.write('problem\n=======\n') | ||
| assert detect_merge_conflict([str(f.realpath())]) == 0 |
Member
There was a problem hiding this comment.
can just use f.strpath here instead of str(f.realpath())
thanks for fixing this test too 👍
Contributor
Author
There was a problem hiding this comment.
strpath is not officially documented. this is why I've used realpath
Member
There was a problem hiding this comment.
interesting! str(f) will work too. I'll work on getting that documented from the py side 😆
Member
|
to fix windows, you can |
Member
|
Thanks @vinayinvicible this is awesome 🎉 |
Contributor
Author
|
Thanks for instant feedbacks 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #300