diff options
-rw-r--r-- | INSTALL.md | 6 | ||||
-rw-r--r-- | README.md | 45 | ||||
-rwxr-xr-x | git_deps/cli.py | 3 |
3 files changed, 36 insertions, 18 deletions
@@ -76,12 +76,6 @@ Rather than following the above manual steps, you can try This has been tested on Ubuntu 14.10, where it was used as a way to circumvent difficulties with installing libgit2 >= 0.22. -However, at the time of writing, [this repository needs to be adapted -to the module-based installation -mechanism](https://github.com/paulwellnerbou/git-deps-docker/issues/2) -which was [recently introduced to -`git-deps`](https://github.com/aspiers/git-deps/pull/71). - ## Check installation Now `git-deps` should be on your `$PATH`, which means that executing @@ -116,32 +116,53 @@ Please see [the `INSTALL.md` file](INSTALL.md). Usage ----- -The tool is not yet fully documented, but usage is fairly -self-explanatory if you run `git deps -h`. +Usage is fairly self-explanatory if you run `git deps -h`: + +``` +usage: git-deps [options] COMMIT-ISH [COMMIT-ISH...] + +Auto-detects commits on which the given commit(s) depend. + +optional arguments: + -h, --help Show this help message and exit + -v, --version show program's version number and exit + -l, --log Show commit logs for calculated dependencies + -j, --json Output dependencies as JSON + -s, --serve Run a web server for visualizing the dependency graph + -b IP, --bind-ip IP IP address for webserver to bind to [127.0.0.1] + -p PORT, --port PORT Port number for webserver [5000] + -r, --recurse Follow dependencies recursively + -e COMMITISH, --exclude-commits COMMITISH + Exclude commits which are ancestors of the given COMMITISH (can be repeated) + -c NUM, --context-lines NUM + Number of lines of diff context to use [1] + -d, --debug Show debugging +``` Currently you should run it from the root (i.e. top directory) of the git repository you want to examine; this is a [known limitation](https://github.com/aspiers/git-deps/issues/27). -By default it will output all dependencies of the given commit-ish(s), -one per line. With `--recurse`, it will traverse dependencies of -dependencies, and so on until it cannot find any more. In recursion -mode, two SHA1s are output per line, indicating that the first depends -on the second. +By default it will output the SHA1s of all dependencies of the given +commit-ish(s), one per line. With `--recurse`, it will traverse +dependencies of dependencies, and so on until it cannot find any more. +In recursion mode, two SHA1s are output per line, indicating that the +first depends on the second. ### Web UI for visualizing and navigating the dependency graph -If you run with the `--serve` option then it will start a lightweight -webserver and output a URL you can connect to for dynamically -visualizing and navigating the dependency graph. +If you run it with the `--serve` option and no COMMIT-ISH parameters, +then it will start a lightweight webserver and output a URL you can +connect to for dynamically visualizing and navigating the dependency +graph. Optionally choose a commit-ish (the form defaults to `master`), click the `Submit` button, and you should see a graph appear with one node per commit. By hovering the mouse over a node you will see more details, and a little `+` icon will appear which can be clicked to calculate dependencies of that commit, further growing the dependency -tree. You can zoom in and -out with the mousewheel, and drag the background to pan around. +tree. You can zoom in and out with the mousewheel, and drag the +background to pan around. If you set up a MIME handler for the `gitfile://` protocol during setup, [as documented](INSTALL.md) you will be able to double-click on diff --git a/git_deps/cli.py b/git_deps/cli.py index da636df..be2fb45 100755 --- a/git_deps/cli.py +++ b/git_deps/cli.py @@ -35,6 +35,9 @@ from git_deps.utils import abort def parse_args(): + ##################################################################### + # REMINDER!! If you change this, remember to update README.md too. + ##################################################################### parser = argparse.ArgumentParser( description='Auto-detects commits on which the given ' 'commit(s) depend.', |