Patch #37614
closedCleanup app/models/repository/git.rb
Description
The attached patches improve the readability of app/models/repository/git.rb.
Files
Updated by Go MAEDA about 2 years ago
- Target version set to 5.1.0
Setting the target version to 5.1.0.
Updated by Holger Just about 2 years ago
The changes should all be equivalent to what's currently there.
As a tiny personal preference though, I'm not a huge fan of the explicit fetch in your 0005 patch. While it makes it make sit very explicit that we expect a nil
here (which I guess is why Rubocop recommends this) but it looks rather in-elegant and verbose, especially considering that we check for the nil just one line below.
Apart from that, it looks good to me. If there is no simple way to shut up Rubocop about the explicit fetch, I would be fine with that too if it helps keep the coding style consistent.
Updated by Go MAEDA about 2 years ago
Holger Just wrote:
As a tiny personal preference though, I'm not a huge fan of the explicit fetch in your 0005 patch. While it makes it make sit very explicit that we expect a
nil
here (which I guess is why Rubocop recommends this) but it looks rather in-elegant and verbose, especially considering that we check for the nil just one line below.
Thank you for reviewing the patches. The point you made about report_last_commit
method is right. I will commit the patches after removing the change to the method.
Updated by Go MAEDA about 2 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
Committed the patches.