@@ -51,7 +51,7 @@ var ErrSubmitReviewOnClosedPR = errors.New("can't submit review for a closed or
51
51
// If the line got changed the comment is going to be invalidated.
52
52
func checkInvalidation (ctx context.Context , c * issues_model.Comment , repo * git.Repository , branch string ) error {
53
53
// FIXME differentiate between previous and proposed line
54
- commit , err := repo .LineBlame (branch , repo .Path , c .TreePath , uint (c .UnsignedLine ()))
54
+ commit , err := repo .LineBlame (ctx , branch , repo .Path , c .TreePath , uint (c .UnsignedLine ()))
55
55
if err != nil && (strings .Contains (err .Error (), "fatal: no such path" ) || notEnoughLines .MatchString (err .Error ())) {
56
56
c .Invalidated = true
57
57
return issues_model .UpdateCommentInvalidate (ctx , c )
@@ -233,7 +233,7 @@ func createCodeComment(ctx context.Context, doer *user_model.User, repo *repo_mo
233
233
// FIXME validate treePath
234
234
// Get latest commit referencing the commented line
235
235
// No need for get commit for base branch changes
236
- commit , err := gitRepo .LineBlame (head , gitRepo .Path , treePath , uint (line ))
236
+ commit , err := gitRepo .LineBlame (ctx , head , gitRepo .Path , treePath , uint (line ))
237
237
if err == nil {
238
238
commitID = commit .ID .String ()
239
239
} else if ! (strings .Contains (err .Error (), "exit status 128 - fatal: no such path" ) || notEnoughLines .MatchString (err .Error ())) {
0 commit comments