mirror of https://github.com/harness/drone.git
[CODE-1299] fix diff git with double quotes name (#959)
parent
74def977f2
commit
13b89482f2
|
@ -240,7 +240,7 @@ func (p *Parser) parseFileHeader() (*File, error) {
|
|||
|
||||
// NOTE: In case file name is surrounded by double quotes (it happens only in
|
||||
// git-shell). e.g. diff --git "a/xxx" "b/xxx"
|
||||
hasQuote := line[len(diffHead)] == '"'
|
||||
hasQuote := line[len(diffHead)] == '"' || line[len(line)-1] == '"'
|
||||
middle := strings.Index(line, ` b/`)
|
||||
if hasQuote {
|
||||
middle = strings.Index(line, ` "b/`)
|
||||
|
|
Loading…
Reference in New Issue