readmarks

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package readmarks remembers which files of a merge request have been read, so a review spread over two sittings does not start again at the top.

A mark belongs to a commit rather than to a merge request: once the author pushes, what you read is not what is there any more, and carrying the marks over would hide the very lines that changed. Each merge request keeps one entry, stamped with the commit it was read at — so a new head commit replaces what was there rather than accumulating beside it, and reading an entry stamped with a different commit gives nothing back.

Index

Constants

View Source
const Max = 50

Max is how many merge requests are remembered: enough to cover the ones in flight at once, short enough that the file stays a working note.

Variables

This section is empty.

Functions

func Load

func Load(configDir string, ref forge.Ref, mr int, sha string) []string

Load is the files read on this merge request at this commit.

A missing file, an unreadable one, a corrupt one and an entry stamped with another commit all give nothing back and report no error: none of them is worth stopping a review for, and every one is indistinguishable to the reader from "you have not read any of this yet".

func Path

func Path(configDir string) string

Path is where the marks live, beside the recents the same config dir holds.

func Save

func Save(configDir string, ref forge.Ref, mr int, sha string, files []string) error

Save records the files read on this merge request at this commit, replacing whatever was held for it before.

A merge request with nothing read is dropped rather than stored empty: the file is a list of what has been done, and a row saying nothing has been done is the same as no row.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL