aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-deps8
-rw-r--r--html/js/git-deps-graph.js6
2 files changed, 13 insertions, 1 deletions
diff --git a/git-deps b/git-deps
index 0766edc..ddc1b24 100755
--- a/git-deps
+++ b/git-deps
@@ -666,8 +666,14 @@ def serve(options):
def deps(commitish):
listener = JSONDependencyListener(options)
detector = DependencyDetector(options, listener=listener)
+ sha1 = detector.get_commit(commitish)
detector.find_dependencies(commitish)
- return flask.json.jsonify(listener.json())
+ json = listener.json()
+ json['root'] = {
+ 'commitish' : commitish,
+ 'sha1': sha1.hex,
+ }
+ return flask.json.jsonify(json)
# We don't want to see double-decker warnings, so check
# WERKZEUG_RUN_MAIN which is only set for the first startup, not
diff --git a/html/js/git-deps-graph.js b/html/js/git-deps-graph.js
index 02f64db..fc49b2f 100644
--- a/html/js/git-deps-graph.js
+++ b/html/js/git-deps-graph.js
@@ -141,6 +141,8 @@ function add_data(data) {
new_links += add_link(dep.parent, dep.child);
});
+ noty_info(data.root.commitish + " resolved as " + data.root.sha1);
+
if (new_nodes > 0 || new_links > 0) {
if (options.debug) {
noty_debug(new_nodes + " new node(s), " +
@@ -179,6 +181,10 @@ function noty_warn(text) {
notyfication('warning', text);
}
+function noty_info(text) {
+ notyfication('information', text);
+}
+
function noty_debug(text) {
notyfication('information', text);
}