8000 git: worktree_status, took into account code review remarks · go-git/go-git@b2bb975 · GitHub
[go: up one dir, main page]

Skip to content

Commit b2bb975

Browse files
committed
git: worktree_status, took into account code review remarks
1 parent 518ac88 commit b2bb975

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

worktree_status.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,10 @@ func (w *Worktree) doAdd(path string, ignorePattern []gitignore.Pattern, skipSta
370370
}
371371
}
372372

373+
path = filepath.Clean(path)
374+
373375
if err != nil || !fi.IsDir() {
374-
added, h, err = w.doAddFile(idx, s, filepath.Clean(path), ignorePattern)
376+
added, h, err = w.doAddFile(idx, s, path, ignorePattern)
375377
} else {
376378
added, err = w.doAddDirectory(idx, s, path, ignorePattern)
377379
}

0 commit comments

Comments
 (0)
0