Ignore changed files under removed paths
This fixes the issue commit 43ab2acf8242c580b1ef5d644ea94d48669d4869 "Resurrect gem-specific patterns for sync" described.
This commit is contained in:
parent
9aeb6e72db
commit
67dedf8cf6
@ -447,15 +447,7 @@ module SyncDefaultGems
|
||||
|
||||
# Gem-specific patterns
|
||||
case gem
|
||||
when "yarp"
|
||||
%r[\A(?:
|
||||
Makefile\.in
|
||||
|configure\.ac
|
||||
|fuzz/.*
|
||||
|rust/.*
|
||||
|tasks/.*
|
||||
|ext/yarp/extconf\.rb
|
||||
)\z]mx
|
||||
when nil
|
||||
end&.tap do |pattern|
|
||||
patterns << pattern
|
||||
end
|
||||
@ -606,6 +598,8 @@ module SyncDefaultGems
|
||||
if picked
|
||||
system(*%w"git commit --amend --no-edit --", *remove, %i[out err] => File::NULL)
|
||||
end
|
||||
remove = remove.map {|d| d + "/"}
|
||||
changed.delete_if {|f| remove.any? {|d| f.start_with?(d)}}
|
||||
end
|
||||
|
||||
unless ignore.empty?
|
||||
|
Loading…
x
Reference in New Issue
Block a user