git-meta’s documentation

Authors:Jules David <jules@onada.fr> Tristan Gregoire <tristan@onada.fr>
Source code:github.com project
Bug tracker:github.com issues
License:BSD
Generated:Dec 20, 2020
Version:0.2

git-meta allows you to get a clear picture of all your local repository states.

_images/terminal.png

It is based on the gitpython library

API

class gitmeta.Meta[source]

Class handling the repositories database

discover()[source]

Scan the subfolders to discover repositories

read_list()[source]

Read the database file to extract the paths of previously scanned repositories

scan(clean=False, filter_status=None)[source]

Scan all the repositories in the database for their statuses

Parameters:
  • clean (bool) – If True, remove any unvalid repository from the watched list
  • filter_status (str) – Only return repositiries having the given status. Usable status are “OK”, “KO”, “remote”, “NOK” and “all”
class gitmeta.Repo(path=None, odbt=<class 'git.db.GitCmdObjectDB'>, search_parent_directories=False, expand_vars=True)[source]

Bases: git.repo.base.Repo

Class representing a repository.

Allows to perform common git commands

has_remote()[source]
Returns:
True if the repository has a remote branch defined for at least
local branch
Return type:bool
remote_diff()[source]

For each branch with a remote counterpart, give the number of commit difference

Returns:
keys -> branch name
values -> number
Return type:dict
stashed()[source]

List stashes

Returns:True if there is stashed modifications
Return type:bool
statusline(line_width=80)[source]

Create the status line for the selected repository.

Returns:Status line as used by git-meta
Return type:string

Tests

git-meta tests are located in the test/ folder. They are powered by pytest.

In order to launch the test series, you only have to type the command :

$ py.test

in the base folder.

Indices and tables