Skip to content

Investigating how to more robustly retrieve renaming information from the GIT API #21

@tl6kk

Description

@tl6kk

The currentreader.parse_history usescommit.stats.files[file], which has additions deletions stats of the commit. But the file name follows the => pattern for renamed files and this involves string manipulation to parse old and new names. The current parsing relies on git out pattern of { => } for renaming. A more robust way may be to use GitPython's functionality.

Investigated the commit.diff([parent_commit]) function. This returns a diff object that has a_path for the old name and b_path for the new name after the commit. But the stats are in the diff attribute like @@ -1,19 +1,21 @@\n ---\n... which involves more string manipulations to parse the stats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions