Project

General

Profile

Actions

Patch #37614

closed

Cleanup app/models/repository/git.rb

Added by Go MAEDA over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The attached patches improve the readability of app/models/repository/git.rb.


Files

Actions #2

Updated by Go MAEDA over 1 year ago

  • Target version set to 5.1.0

Setting the target version to 5.1.0.

Actions #3

Updated by Holger Just over 1 year 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.

Actions #4

Updated by Go MAEDA over 1 year 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.

Actions #5

Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patches.

Actions

Also available in: Atom PDF