Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 65c5695

Browse files
committed
Fix bufferedSeeker.Seek for SeekCurrent and non-zero offset.
Signed-off-by: Filip Navara <[email protected]>
1 parent b77f22b commit 65c5695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plumbing/format/packfile/scanner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ type bufferedSeeker struct {
423423
}
424424

425425
func (r *bufferedSeeker) Seek(offset int64, whence int) (int64, error) {
426-
if whence == io.SeekCurrent {
426+
if whence == io.SeekCurrent && offset == 0 {
427427
current, err := r.r.Seek(offset, whence)
428428
if err != nil {
429429
return current, err

0 commit comments

Comments
 (0)