Metadata-Version: 2.2
Name: git-dag
Version: 0.0.4
Summary: Generates the DAG of a git repository
Author-email: Dimitar Dimitrov <mail.mitko@gmail.com>
License: Apache 2.0
Project-URL: homepage, https://github.com/drdv/git-dag
Project-URL: documentation, https://github.com/drdv/git-dag
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic
Requires-Dist: graphviz
Requires-Dist: argcomplete
Provides-Extra: lint
Requires-Dist: pylint; extra == "lint"
Requires-Dist: pylint-report; extra == "lint"
Requires-Dist: pydocstyle; extra == "lint"
Provides-Extra: code
Requires-Dist: black; extra == "code"
Requires-Dist: isort; extra == "code"
Requires-Dist: pre-commit; extra == "code"
Provides-Extra: types
Requires-Dist: mypy; extra == "types"
Requires-Dist: lxml; extra == "types"
Requires-Dist: types-requests; extra == "types"
Requires-Dist: pandas-stubs; extra == "types"
Requires-Dist: types-openpyxl; extra == "types"
Requires-Dist: types-Pillow; extra == "types"
Provides-Extra: dev
Requires-Dist: git_dag[code,lint,types]; extra == "dev"

## Generates the DAG of a git repository

### Install

+ `pip install git-dag`

### Getting help

+ `git dag -h` to display help

```
usage: git-dag [-h] [-p PATH] [-f FILE] [-b {graphviz}] [--format FORMAT]
               [--dpi DPI] [-i INIT_REFS [INIT_REFS ...]]
               [-n MAX_NUMB_COMMITS] [--rankdir RANKDIR] [--bgcolor BGCOLOR]
               [-t] [-l] [-r] [-s] [-T] [-B] [-o]
               [--log-level {NOTSET,INFO,WARNING,ERROR,CRITICAL}]

Visualize the git DAG.

options:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  Path to git repository.
  -f FILE, --file FILE  Output graphviz file (could include a directory e.g.,
                        mydir/myfile).
  -b {graphviz}, --dag-backend {graphviz}
                        Backend DAG library.
  --format FORMAT       Graphviz output format (tooltips are available only
                        with svg). If the format is set to 'gv', only the
                        graphviz source file is generated
  --dpi DPI             DPI of output figure (used with --format png).
  -i INIT_REFS [INIT_REFS ...], --init-refs INIT_REFS [INIT_REFS ...]
                        A list of branches, tags, objects' SHA (commits,
                        trees, blobs) that represents a limitation from where
                        to display the DAG
  -n MAX_NUMB_COMMITS, --max-numb-commits MAX_NUMB_COMMITS
                        Max number of commits (set to 0 to remove limitation).
  --rankdir RANKDIR     rankdir argument of graphviz (LR, RL, TB, BT).
  --bgcolor BGCOLOR     bgcolor argument of graphviz (e.g., transparent).
  -t                    Show tags.
  -l                    Show local branches.
  -r                    Show remote branches.
  -s                    Show stash.
  -T                    Show trees (WARNING: should be used only with small
                        repositories).
  -B                    Show blobs (discarded if -T is not set).
  -o, --xdg-open        Open output SVG file with xdg-open.
  --log-level {NOTSET,INFO,WARNING,ERROR,CRITICAL}
                        Log level.
```

### Examples

+ `git dag -rlst -n 20` would generate `git-dag.gv` (a [graphviz](https://graphviz.org/)
  dot file) and `git-dag.gv.svg` with:
  + the 20 most recent commits (`-n 20`, use `-n -1` to show all)
  + all local branches (`-l`)
  + all remote branches (`-r`)
  + the stash (`-s`)
  + all tags (`-t`)

+ displaying trees (`-T`) and blobs (`-B`) is recommended only for small(ish)
  repositories.

+ using `-n 10 -i my-branch my-tag` would display the 10 most recent commits accessible
  from `my-branch` or `my-tag`.

### Default color-codes

|                object | [color name](https://graphviz.org/doc/info/colors.html) |
|----------------------:|:--------------------------------------------------------|
|                commit | ${\texttt{\color{#cdad00}gold3}}$                       |
|    unreachable commit | ${\texttt{\color{#ff8c00}darkorange}}$                  |
|                  tree | ${\texttt{\color{#00688b}deepskyblue4}}$                |
|        the empty tree | ${\texttt{\color{#00ced1}darkturquoise}}$               |
|                  blob | ${\texttt{\color{#bebebe}gray}}$                        |
|         annotated tag | ${\texttt{\color{#ffc0cb}pink}}$                        |
| deleted annotated tag | ${\texttt{\color{#ffc0cb}rosybrown4}}$                  |
|       lightweight tag | ${\texttt{\color{#f08080}lightcoral}}$                  |
|          local branch | ${\texttt{\color{#228b22}forestgreen}}$                 |
|         remote branch | ${\texttt{\color{#b22222}firebrick}}$                   |
|                 stash | ${\texttt{\color{#87ceeb}skyblue}}$                     |
|                  HEAD | ${\texttt{\color{#6495ed}cornflowerblue}}$              |
