зеркало из https://github.com/github/ruby.git
fix regexp pattern of diff
This commit is contained in:
Родитель
e223dde329
Коммит
6b3abcf462
|
@ -235,11 +235,11 @@ eom
|
|||
diff.each_with_index do |line, index|
|
||||
case index
|
||||
when 0
|
||||
line.sub!(/\A--- (.*)\t(\d+-\d+-\d+ [0-9:.]+ [\-+]\d+)\Z/) do
|
||||
line.sub!(/\A--- (.*)\t(\d+-\d+-\d+ [0-9:.]+(?: [\-+]\d+)?)\Z/) do
|
||||
"--- a/#{filename}\t#{$2}"
|
||||
end
|
||||
when 1
|
||||
line.sub!(/\A\+\+\+ (.*)\t(\d+-\d+-\d+ [0-9:.]+ [\-+]\d+)\Z/) do
|
||||
line.sub!(/\A\+\+\+ (.*)\t(\d+-\d+-\d+ [0-9:.]+(?: [\-+]\d+)?)\Z/) do
|
||||
"+++ b/#{filename}\t#{$2}"
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче