aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2013-11-15 21:03:48 -0500
committerAdam Spiers <git@adamspiers.org>2015-01-05 16:57:08 +0000
commit5ec5ccbdff508014c61ae9d18f3366a15c0f2689 (patch)
tree4f8318386c0d98ae4d0ddf28e6693f83037a1b83
parent33b6a514b9777976f830a2a328cb0afc54a0355b (diff)
downloadgit-deps-5ec5ccbdff508014c61ae9d18f3366a15c0f2689.tar.gz
add first line of commits to debug
-rwxr-xr-xgit-deps11
1 files changed, 8 insertions, 3 deletions
diff --git a/git-deps b/git-deps
index 774ff8c..5e53bc9 100755
--- a/git-deps
+++ b/git-deps
@@ -214,7 +214,8 @@ class DependencyDetector:
dependent_sha = dependent.hex
if dependent_sha not in self.dependencies:
- self.logger.debug(' New dependent: %s' % dependent_sha[:8])
+ self.logger.debug(' New dependent: %s (%s)' %
+ (dependent_sha[:8], self.oneline(dependent)))
self.dependencies[dependent_sha] = {}
self.notify_listeners('new_dependent', dependent)
@@ -229,8 +230,9 @@ class DependencyDetector:
dependency = self.get_commit(dependency_sha)
if dependency_sha not in self.dependencies[dependent_sha]:
- self.logger.debug(' New dependency %s via line %s' %
- (dependency_sha[:8], line_num))
+ self.logger.debug(' New dependency %s via line %s (%s)' %
+ (dependency_sha[:8], line_num,
+ self.oneline(dependency)))
self.dependencies[dependent_sha][dependency_sha] = {}
self.notify_listeners('new_dependency', dependent, dependency, path, line_num)
if dependency_sha not in self.dependencies:
@@ -260,6 +262,9 @@ class DependencyDetector:
line_num += 1
self.logger.debug(diff_format % (rev, ln, mode, line.rstrip()))
+ def oneline(self, commit):
+ return commit.message.split('\n', 1)[0]
+
def tree_lookup(self, target_path, commit):
"""Navigate to the tree or blob object pointed to by the given target
path for the given commit. This is necessary because each git