diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-12 22:44:48 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-12 22:44:48 +0000 |
commit | 149f5253f8d0f92aaf93922e17b5c86df3f92178 (patch) | |
tree | 6822802eb92ec951b4f28825a42a7c01b02fb0d4 | |
parent | 284b0ca7ecbaad098afd56cb95a144db12f09938 (diff) | |
download | git-deps-149f5253f8d0f92aaf93922e17b5c86df3f92178.tar.gz |
move sha1_of_link_pointer() back next to link_key()
-rw-r--r-- | html/js/git-deps-graph.coffee | 16 |
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] |