Skip to content

FileMod

Bases: GitObject

A file modification in a specific commit.

commit_hash

commit_hash: str

Full hash of the commit.

path_a

path_a: str

Path to the file before applying the commit's changes.

path_b

path_b: str

Path to the file after applying the commit's changes.

Differs from path_a for renames and copies.

filemod_id

filemod_id: str

Unique record identifier hashed from commit_hash, path_a, and path_b.

change_type

change_type: str

Single-letter code representing the change type.

Most commonly one of A (added), C (copied), D (deleted), M (modified) or R (renamed). See git-status for all possible values.

similarity

similarity: int

Similarity index between the two file versions.

0-100 for renames and copies, 100 otherwise.

lines_added

lines_added: int

Number of lines added to the file in the commit.

lines_deleted

lines_deleted: int

Number of lines deleted from the file in the commit.