aboutsummaryrefslogtreecommitdiffstats
path: root/html/js
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-11 14:05:56 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-11 15:17:59 +0000
commit8b3d182fabee62ae52060b74c03ffe97142929dd (patch)
treebc6c0fc263fb35905f9679aac6ed63e35fb64de4 /html/js
parentfdd5a23a021dc1eb1eb856826db7e3c83a215c70 (diff)
downloadgit-deps-8b3d182fabee62ae52060b74c03ffe97142929dd.tar.gz
via JSON response, track which commits have been explored (#17)
Fixes #17.
Diffstat (limited to 'html/js')
-rw-r--r--html/js/git-deps-data.coffee6
1 files changed, 5 insertions, 1 deletions
diff --git a/html/js/git-deps-data.coffee b/html/js/git-deps-data.coffee
index 0219a75..0b47ce1 100644
--- a/html/js/git-deps-data.coffee
+++ b/html/js/git-deps-data.coffee
@@ -20,7 +20,11 @@ deps = {}
# Returns 1 iff a node was added, otherwise 0.
add_node = (commit) ->
- return 0 if commit.sha1 of node_index
+ if commit.sha1 of node_index
+ n = node commit.sha1
+ n.explored ||= commit.explored
+ return 0
+
nodes.push commit
node_index[commit.sha1] = nodes.length - 1
return 1