aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-12 22:44:48 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-12 22:44:48 +0000
commit149f5253f8d0f92aaf93922e17b5c86df3f92178 (patch)
tree6822802eb92ec951b4f28825a42a7c01b02fb0d4
parent284b0ca7ecbaad098afd56cb95a144db12f09938 (diff)
downloadgit-deps-149f5253f8d0f92aaf93922e17b5c86df3f92178.tar.gz
move sha1_of_link_pointer() back next to link_key()
-rw-r--r--html/js/git-deps-graph.coffee16
1 files changed, 8 insertions, 8 deletions
diff --git a/html/js/git-deps-graph.coffee b/html/js/git-deps-graph.coffee
index aba5eca..6157a42 100644
--- a/html/js/git-deps-graph.coffee
+++ b/html/js/git-deps-graph.coffee
@@ -223,6 +223,14 @@ link_key = (link) ->
target = sha1_of_link_pointer(link.target)
return source + " " + target
+# ... but even though link sources and targets are initially fed in
+# as indices into the nodes array, webcola then replaces the indices
+# with references to the node objects. So we have to deal with both
+# cases when ensuring we are uniquely identifying each link.
+sha1_of_link_pointer = (pointer) ->
+ return pointer.sha1 if typeof (pointer) is "object"
+ return gdd.nodes[pointer].sha1
+
init_tip = () ->
tip = d3.tip().attr("class", "d3-tip").html(tip_html)
global.tip = tip
@@ -302,14 +310,6 @@ explore_node = (d) ->
else
add_commitish d.sha1
-# ... but even though link sources and targets are initially fed in
-# as indices into the nodes array, webcola then replaces the indices
-# with references to the node objects. So we have to deal with both
-# cases when ensuring we are uniquely identifying each link.
-sha1_of_link_pointer = (pointer) ->
- return pointer.sha1 if typeof (pointer) is "object"
- return gdd.nodes[pointer].sha1
-
new_data_notification = (new_data) ->
new_nodes = new_data[0]
new_deps = new_data[1]