Skip to content

Commit bd1455a

Browse files
committed
even-quicker
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 53bc4d1 commit bd1455a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/git/commit_info_nogogit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ func GetLastCommitForPaths(commit *Commit, treePath string, paths []string) ([]*
141141

142142
go func() {
143143
stderr := strings.Builder{}
144-
err := NewCommand("rev-list", "--format=%T", commit.ID.String()).RunInDirPipeline(commit.repo.Path, revListWriter, &stderr)
144+
args := []string{"rev-list", "--format=%T", commit.ID.String()}
145+
if treePath != "" {
146+
args = append(args, "--", treePath)
147+
}
148+
err := NewCommand(args...).RunInDirPipeline(commit.repo.Path, revListWriter, &stderr)
145149
if err != nil {
146150
_ = revListWriter.CloseWithError(ConcatenateError(err, (&stderr).String()))
147151
} else {

0 commit comments

Comments
 (0)