Skip to content

Optimize finding root of repo #26

@jacekv

Description

@jacekv

Lot's of function have the following code in the beginning:

try:
        repo_root_path = get_repo_root_path()
    except NoRepositoryError as nre:
        print(nre)
        exit(1)

All this code does is to locate the path to the .git folder. If there is none, there is no repository.
This should be done before calling the functions and the data should be passed to the functions itself!

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