-
-
Notifications
You must be signed in to change notification settings - Fork 716
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
Added --assume-in-merge option for check-merge-conflict #301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise looks great 👍
args = parser.parse_args(argv) | ||
|
||
if not is_in_merge(): | ||
if not is_in_merge(args): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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\)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
tests/check_merge_conflict_test.py
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can just use f.strpath
here instead of str(f.realpath())
thanks for fixing this test too 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strpath
is not officially documented. this is why I've used realpath
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting! str(f)
will work too. I'll work on getting that documented from the py
side 😆
to fix windows, you can |
Thanks @vinayinvicible this is awesome 🎉 |
Thanks for instant feedbacks 👍 |
Fixes #300