( )⚙ D593 cmdutil: removing redundant if condition in amend

This is an archive of the discontinued Mercurial Phabricator instance.

cmdutil: removing redundant if condition in amend
AbandonedPublic

Authored by singhsrb on Aug 31 2017, 10:01 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

There is needless checking for the new commit hash not being equal to
the old commit hash. This condition will always be true at this point in the
code path and thus, can be removed safely. This commit removes the redundant
condition.

Test Plan

ran the test suite.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

singhsrb created this revision.Aug 31 2017, 10:01 PM
durham added a subscriber: durham.Sep 1 2017, 3:26 PM

I'd probably fold this together with the next commit. Splitting commits is good when it increases readability or increases bisect ability. This change is so small I think readability is fine in one commit, and the feature change is only in one commit anyway so bisectability isn't hurt.

singhsrb updated this revision to Diff 1561.Sep 1 2017, 6:15 PM
singhsrb abandoned this revision.

Please see D594 instead. This commit has been merged into that commit.