Skip to content

Commit

Permalink
typo: missed refactoring to target_length
Browse files Browse the repository at this point in the history
  • Loading branch information
cpb committed Oct 8, 2024
1 parent b45deaa commit c39e947
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/lengthen-sha1
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ module TrackSha1Assertions
extra += 1
end

lengthened = passing.slice(0..sha1.length + extra)
lengthened = passing.slice(0..target_length + extra)

super(lengthened, *contributor_names, **options)
relative_test_file, calling_test_line = relative_test_file_and_line(e.backtrace)

warn "Ambiguous sha1 #{sha1} was lengthened to #{passing.slice(0..sha1.length + extra)} to pass rails test #{relative_test_file}:#{calling_test_line}"
warn "Ambiguous sha1 #{sha1} was lengthened to #{passing.slice(0..target_length + extra)} to pass rails test #{relative_test_file}:#{calling_test_line}"
sha1_lengthenings.push([relative_test_file, sha1, lengthened])
else
raise e
Expand Down

0 comments on commit c39e947

Please sign in to comment.