Closed bradleyfalzon closed 8 years ago
We need to accept patches which have the a/ and b/ prefixes, eg:
index 0000000..2293375 --- /dev/null +++ b/main.go
We were stripping them out before, because we could, but if you're providing a patch, you may not be able to strip them out yourself.
This should be straight forward, something like:
diff --git a/revgrep.go b/revgrep.go index 19e111f..61e3fe3 100644 --- a/revgrep.go +++ b/revgrep.go @@ -160,7 +160,7 @@ func (c Checker) linesChanged() map[string][]uint64 { // record the last state changes[s.file] = s.changes } - s = state{file: line[4:]} + s = state{file: line[6:]} case strings.HasPrefix(line, "@@ "): // @@ -1 +2,4 @@ // chdr ^^^^^^^^^^^^^
We need to accept patches which have the a/ and b/ prefixes, eg:
We were stripping them out before, because we could, but if you're providing a patch, you may not be able to strip them out yourself.
This should be straight forward, something like: