@@ -381,7 +381,7 @@ def sync_default_gems(gem)
381381 end
382382
383383 porcelain_status ( ) . each do |line |
384- /\A (?<x> .)(?<y> .) (?<path>.*)\z / =~ line or raise
384+ /\A (?: .)(?: .) (?<path>.*)\z / =~ line or raise
385385 if config . excluded? ( path )
386386 puts "Restoring excluded file: #{ path } "
387387 IO . popen ( %W" git checkout -- " + [ path ] , "rb" , &:read )
@@ -553,7 +553,7 @@ def resolve_conflicts(gem, sha, edit)
553553 end
554554
555555 def collect_cacheinfo ( tree )
556- cacheinfo = pipe_readlines ( %W" git ls-tree -r -t -z #{ tree } " ) . filter_map do |line |
556+ pipe_readlines ( %W" git ls-tree -r -t -z #{ tree } " ) . filter_map do |line |
557557 fields , path = line . split ( "\t " , 2 )
558558 mode , type , object = fields . split ( " " , 3 )
559559 next unless type == "blob"
@@ -640,12 +640,11 @@ def make_and_fixup_commit(gem, original_commit, cacheinfo, parent: nil, message:
640640 end
641641
642642 def rewrite_commit ( gem , sha )
643- config = REPOSITORIES [ gem ]
644643 author , message = make_commit_info ( gem , sha )
645644 new_blobs = collect_cacheinfo ( "#{ sha } " )
646645 new_rewritten , new_ignored = rewrite_cacheinfo ( gem , new_blobs )
647646
648- headers , orig_message = IO . popen ( %W[ git cat-file commit #{ sha } ] , "rb" , &:read ) . split ( "\n \n " , 2 )
647+ headers , _ = IO . popen ( %W[ git cat-file commit #{ sha } ] , "rb" , &:read ) . split ( "\n \n " , 2 )
649648 first_parent = headers [ /^parent (.{40})$/ , 1 ]
650649 unless first_parent
651650 # Root commit, first time to sync this repo
@@ -674,8 +673,6 @@ def rewrite_commit(gem, sha)
674673 end
675674
676675 def pickup_commit ( gem , sha , edit )
677- config = REPOSITORIES [ gem ]
678-
679676 rewritten = rewrite_commit ( gem , sha )
680677
681678 # No changes remaining after rewriting
0 commit comments