You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varx=5;// just an examplevaroptions=new BlameOptions {MinLine=x,MaxLine=x};varhunks= repository.Blame(path, options);varhunk= hunks.HunkForLine(x);// throws ArgumentOutOfRangeException: 'No hunk for that line'
It seems that though the line numbers in BlameOptions are one-based (according to the code comments), BlameHunkCollection.HunkForLine, BlameHunk.ContainsLine, BlameHunk.FinalStartLineNumber and BlameHunk.InitialStartLineNumber are all zero based.
Is this a bug, or intentional? If intentional, it would be good to add to the comments on all of these which base is to be expected. Thanks.
I can subtract one in the HunkForLine call to work around for now.
The text was updated successfully, but these errors were encountered:
It seems that though the line numbers in
BlameOptions
are one-based (according to the code comments),BlameHunkCollection.HunkForLine
,BlameHunk.ContainsLine
,BlameHunk.FinalStartLineNumber
andBlameHunk.InitialStartLineNumber
are all zero based.Is this a bug, or intentional? If intentional, it would be good to add to the comments on all of these which base is to be expected. Thanks.
I can subtract one in the
HunkForLine
call to work around for now.The text was updated successfully, but these errors were encountered: