Skip to content

Commit ac1e7de

Browse files
authored
Merge branch 'main' into fix/review-request-number
2 parents 812c792 + ad3cbbc commit ac1e7de

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

modules/git/log_name_status.go

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -374,27 +374,25 @@ heaploop:
374374
break heaploop
375375
}
376376
parentRemaining.Remove(current.CommitID)
377-
if current.Paths != nil {
378-
for i, found := range current.Paths {
379-
if !found {
380-
continue
377+
for i, found := range current.Paths {
378+
if !found {
379+
continue
380+
}
381+
changed[i] = false
382+
if results[i] == "" {
383+
results[i] = current.CommitID
384+
if err := repo.LastCommitCache.Put(headRef, path.Join(treepath, paths[i]), current.CommitID); err != nil {
385+
return nil, err
381386
}
382-
changed[i] = false
383-
if results[i] == "" {
384-
results[i] = current.CommitID
385-
if err := repo.LastCommitCache.Put(headRef, path.Join(treepath, paths[i]), current.CommitID); err != nil {
387+
delete(path2idx, paths[i])
388+
remaining--
389+
if results[0] == "" {
390+
results[0] = current.CommitID
391+
if err := repo.LastCommitCache.Put(headRef, treepath, current.CommitID); err != nil {
386392
return nil, err
387393
}
388-
delete(path2idx, paths[i])
394+
delete(path2idx, "")
389395
remaining--
390-
if results[0] == "" {
391-
results[0] = current.CommitID
392-
if err := repo.LastCommitCache.Put(headRef, treepath, current.CommitID); err != nil {
393-
return nil, err
394-
}
395-
delete(path2idx, "")
396-
remaining--
397-
}
398396
}
399397
}
400398
}

0 commit comments

Comments
 (0)