added skipping //comments in .patches
This commit is contained in:
parent
e450251d84
commit
bb64cea202
1 changed files with 5 additions and 0 deletions
5
apply.go
5
apply.go
|
@ -87,6 +87,11 @@ func applyPatch(patchPath, rootPath string) error {
|
|||
for scanner.Scan() {
|
||||
line := scanner.Text()
|
||||
|
||||
// Ignore lines starting with //
|
||||
if strings.HasPrefix(strings.TrimSpace(line), "//") {
|
||||
continue
|
||||
}
|
||||
|
||||
// Detect the target file
|
||||
if strings.HasPrefix(line, "--- ") {
|
||||
relativePath := strings.TrimSpace(strings.TrimPrefix(line, "--- "))
|
||||
|
|
Loading…
Add table
Reference in a new issue