Skip to content

Commit 0099c82

Browse files
committed
use function provided context in GetCompareInfo
1 parent 162899b commit 0099c82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/git/repo_compare.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (repo *Repository) GetCompareInfo(ctx context.Context, basePath, baseBranch
7272

7373
compareInfo := new(CompareInfo)
7474

75-
compareInfo.HeadCommitID, err = GetFullCommitID(repo.Ctx, repo.Path, headBranch)
75+
compareInfo.HeadCommitID, err = GetFullCommitID(ctx, repo.Path, headBranch)
7676
if err != nil {
7777
compareInfo.HeadCommitID = headBranch
7878
}
@@ -96,7 +96,7 @@ func (repo *Repository) GetCompareInfo(ctx context.Context, basePath, baseBranch
9696
var logs []byte
9797
logs, _, err = NewCommand("log").AddArguments(prettyLogFormat).
9898
AddDynamicArguments(baseCommitID+separator+headBranch).AddArguments("--").
99-
RunStdBytes(repo.Ctx, &RunOpts{Dir: repo.Path})
99+
RunStdBytes(ctx, &RunOpts{Dir: repo.Path})
100100
if err != nil {
101101
return nil, err
102102
}
@@ -109,7 +109,7 @@ func (repo *Repository) GetCompareInfo(ctx context.Context, basePath, baseBranch
109109
}
110110
} else {
111111
compareInfo.Commits = []*Commit{}
112-
compareInfo.MergeBase, err = GetFullCommitID(repo.Ctx, repo.Path, remoteBranch)
112+
compareInfo.MergeBase, err = GetFullCommitID(ctx, repo.Path, remoteBranch)
113113
if err != nil {
114114
compareInfo.MergeBase = remoteBranch
115115
}

0 commit comments

Comments
 (0)