diff options
author | Adam Spiers <git@adamspiers.org> | 2016-05-26 00:28:25 +0100 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2017-01-02 13:06:39 +0000 |
commit | d601e35f6ea42eb6110e3d1449d03f16a1da3f10 (patch) | |
tree | 8f2a9a399435b4c0ed9cc8aabe5d5a850779f39b /html | |
parent | e4fb3d9eb288b3f0ed8cce1e8e58bd805ef3eed0 (diff) | |
download | git-deps-d601e35f6ea42eb6110e3d1449d03f16a1da3f10.tar.gz |
allow passing a revision range to CLI or web UI
Now revision ranges like A..B or A...B are also accepted, and then git
deps will analyse the dependencies for all revisions in that range.
In the CLI invocation, if a dependency is encountered more than once
from separate commits, it will only be output once.
Diffstat (limited to 'html')
-rw-r--r-- | html/git-deps.html | 2 | ||||
-rw-r--r-- | html/js/git-deps-data.coffee | 2 | ||||
-rw-r--r-- | html/js/git-deps-graph.coffee | 13 |
3 files changed, 10 insertions, 7 deletions
diff --git a/html/git-deps.html b/html/git-deps.html index 2957e74..848ccad 100644 --- a/html/git-deps.html +++ b/html/git-deps.html @@ -26,7 +26,7 @@ </p> <form class="commitish" action="#"> - Detect dependencies for commit: + Detect dependencies for: <input type="text" name="commitish" size="20" value="master" autofocus /> <button>Submit</button> diff --git a/html/js/git-deps-data.coffee b/html/js/git-deps-data.coffee index 9034b18..34715a3 100644 --- a/html/js/git-deps-data.coffee +++ b/html/js/git-deps-data.coffee @@ -82,7 +82,7 @@ add_data = (data) -> return [ new_nodes new_deps - data.root + data.query ] return false diff --git a/html/js/git-deps-graph.coffee b/html/js/git-deps-graph.coffee index b2d36fa..299ed0b 100644 --- a/html/js/git-deps-graph.coffee +++ b/html/js/git-deps-graph.coffee @@ -356,13 +356,16 @@ launch_viewer = (d) -> new_data_notification = (new_data) -> new_nodes = new_data[0] new_deps = new_data[1] - root = new_data[2] + query = new_data[2] notification = - if root.commitish == root.sha1 - "Analysed dependencies of #{root.abbrev}" + if query.revspec == query.tip_sha1 + "Analysed dependencies of #{query.revspec}" + else if query.revisions.length == 1 + "<span class=\"commit-ref\">#{query.revspec}</span> + resolved as #{query.tip_abbrev}" else - "<span class=\"commit-ref\">#{root.commitish}</span> - resolved as #{root.sha1}" + "<span class=\"commit-ref\">#{query.revspec}</span> + expanded; tip is #{query.tip_abbrev}" notification += "<p>#{new_nodes} new commit" notification += "s" unless new_nodes == 1 notification += "; #{new_deps} new " + |