aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2013-11-15 20:49:51 -0500
committerAdam Spiers <git@adamspiers.org>2015-01-05 16:57:07 +0000
commit6e86e8b7f648bd6a3a6d3216aa5899414b65cbed (patch)
tree63fafebeb0cc0c4c4d3bd5be9e91d2ca938170e0
parentf2cddb4aa00de4ddff2cdca251758e25e95e04ad (diff)
downloadgit-deps-6e86e8b7f648bd6a3a6d3216aa5899414b65cbed.tar.gz
don't crash on commits which only add files
-rwxr-xr-xgit-deps3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-deps b/git-deps
index e0ae00c..9da6392 100755
--- a/git-deps
+++ b/git-deps
@@ -176,7 +176,8 @@ class DependencyDetector:
self.find_dependencies_with_parent(dependent, parent)
self.done.append(dependent.hex)
self.logger.debug("Found all dependencies for %s" % dependent.hex[:8])
- dependencies = self.dependencies[dependent.hex]
+ # A commit won't have any dependencies if it only added new files
+ dependencies = self.dependencies.get(dependent.hex, {})
self.notify_listeners('dependent_done', dependent, dependencies)
def find_dependencies_with_parent(self, dependent, parent):