-
Notifications
You must be signed in to change notification settings - Fork 5.8k
HTTP 500 when no commit message #1343
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
|
I think it should be handled in commit but not in gfm |
|
I thought the same but the error is only creating the link... as a Git user i prefer not to see that warning while viewing the commit message. But if you still think is better at commit, then i'll move it there tomorrow. |
|
i think commit should always has a message. At lease something like "-- no message" |
|
what do you think? |
|
It really seems to be common (at least for converted repos) to have commits with no message. |
I just migrate a repo from SVN to Git, some commits did not have message and gitlab raises Nil Exception when it loads commits index view.
Added a condition on commit model to check blank? on commit message and show a warning instead of a Exception.
|
@randx you are right, i made the modification and it looks ok to me Took me a while understand a little bit the commit model :-P |
|
Kind of a duplicate, see #1317 |
|
@IsNull is right, i checked the solution from #1317 and it solves the problem, but @randx suggested a warning message from the model, may be if it's changed to: Because in the HTML generates an empty link: @randx please choose the solution that you think goes better with the current standard of the project, i'm new in this project and i do not know the standard yet :-) . As i said, #1317 also solves the problem. |
|
Why you defined setter method? |
|
Because i was not sure how delegate works, i researched a little and looks like a way to access methods directly from a child resource and it said that is used to save writing getter/setter methods in models, so i understand that if i removed the delegate, i should replace it with getter/setter methods. Am i wrong? Or in this case the setter is not used at all? Or there is a better way to do it keeping the delegate? I'm sorry if i make to many questions, i really like learning about ruby and rails. I hope not to be a nuisance. |
|
we dont delegate setter method so its no need to define it. cause we dont need to handle empty string etc. We afraid only of nil |
|
Is this It is also ambiguous as no message is obviously empty. No need to say that there is nothing. :) |
|
missing commit message is a bad thing in git. I want users get this ugly message. |
|
It is a bad thing, and I also tend to force my team to use a message on every commit.
Questionable if this is the right approach. ;) Probably make it a setting in gitlab.yml like: This way, anyone can adjust it. |
|
Changed my mind. I've decided it will be logical to move it under decorator. |
|
fixed by c7cfe3d |
I just migrate a repo from SVN to Git, some commits did not have message and gitlab shows HTTP 500 when it loads commits index view.