mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
The diff hunk can omit the number of lines after the line position. For example, the following hunks are all valid - @@ -1,2 +1,3 @@ - @@ -1 +1,3 @@ - @@ -1,2 +1 @@ - @@ -1 +1 @@ However, the existing regex assumes that the number of lines is always given. It wasn't a problem before crrev.com/c/6952890, because -U3 was applied always. However, since it changed the context lines to -U0, git diff started generating hunks without the number of lines, if a given changed section contains only a single line. This CL fixes the regex. Bug: 453641840 Change-Id: I67f680bc1d8fa046e373b065e8ccbb6ce652eb3f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7158599 Auto-Submit: Scott Lee <ddoman@chromium.org> Reviewed-by: Yiwei Zhang <yiwzhang@google.com> Commit-Queue: Scott Lee <ddoman@chromium.org>
99 KiB
Executable File
99 KiB
Executable File