-
Notifications
You must be signed in to change notification settings - Fork 533
Add commit --allow-empty-message option and fix empty message parsing in process_commit_log_data #482
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
Conversation
@rvodden @perlun @tarcinil, please can somebody review this pull request? PS: build passed https://travis-ci.org/github/ruby-git/ruby-git/builds/716900598, I'm not sure why the status is not updating |
I re-ran the build and the status was updated. Not sure why it wasn't updating before. |
@kpd200081 can you please add a failing test that this change fixes? You should probable create your own test fixture instead of changing existing fixtures. If you don't have time to figure this out, I can help out -- just let me know. Here is what I told someone else:
|
@jcouball, I'm not sure if a test is needed for this case. Anyway, I'm not familiar with Ruby tests, so if you think it's necessary it would be nice if you could help with that. |
3bbf1e9
to
7340bc5
Compare
@jcouball I added a test that falling without this fix, but I had to change the
|
6267880
to
e725384
Compare
set_file_paths | ||
end | ||
|
||
def test_repo_with_empty_commit |
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.
I think this test name should be changed to test_repo_with_empty_commit_message
since empty commit is something different.
For this functionality, I would think to do two tests:
1.
a test that does not have a commit message and does not use the :allow_empty_message
option
2. a test that does not have a commit message and DOES use the :allow_empty_messages
option
Since the :allow_empty
and :allow_empty_message
options are so similar, I found the use of the :allow_empty
option in this particular test confusing. I'll leave it up to you if you want to do anything about this.
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.
I think this test name should be changed to
test_repo_with_empty_commit_message
since empty commit is something different.
oh, year, I did misspell here
Since the :allow_empty and :allow_empty_message options are so similar, I found the use of the :allow_empty option in this particular test confusing. I'll leave it up to you if you want to do anything about this.
:allow_empty
just allow commit without changes, so it was added to both commits
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.
a test that does not have a commit message and does not use the
:allow_empty_message
option
we can't commit without this option, this results in an error in git
and test failure
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.
So, as test without :allow_empty_message
can't work because of git
internal error, can we resolve this?
daa5445
to
b79eac0
Compare
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.
Looks great! Thank you for the contribution.
… in process_commit_log_data If the commit doesn't contain a message, parsing the output of "git log" results in an error, which occures because the end of the commit message can't be detected. Additionaly was added option to commit without message. Signed-off-by: Pavel Kuznetsov <kpd200081@yandex.ru>
f30de97
to
d2ce751
Compare
@jcouball I fix commit's author and rebase it to remove merge commit, now I think nothing block from accepting PR. |
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.
Description
If the commit doesn't contain a message, parsing the output of "git log"
results in an error, which occures because the end of the commit message
can't be detected.
fixes #481