Skip to main content

Module reflog

Module reflog 

Source
Expand description

Reflog reading (.git/logs/<ref>), git’s local record of every ref movement.

Each line has the form <oldsha40> <newsha40> <name> <email> <unix_ts> <tzoffset>\t<message>\n. The tab before the message is the reliable separator; the identity prefix is parsed git-style (the email lives in <...>, so a name may contain spaces).

Reference: git Documentation/gitrevisions.txt (reflog syntax) and Documentation/git-reflog.txt.

Structs§

ReflogEntry
One reflog line: a single movement of a ref from old to new.

Functions§

parse_reflog
Parse a whole reflog file’s bytes into entries.
read_reflog
Read and parse .git/logs/<refname> for git_dir.