diff options
author | Adam Spiers <git@adamspiers.org> | 2013-11-15 21:03:48 -0500 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-05 16:57:08 +0000 |
commit | 5ec5ccbdff508014c61ae9d18f3366a15c0f2689 (patch) | |
tree | 4f8318386c0d98ae4d0ddf28e6693f83037a1b83 | |
parent | 33b6a514b9777976f830a2a328cb0afc54a0355b (diff) | |
download | git-deps-5ec5ccbdff508014c61ae9d18f3366a15c0f2689.tar.gz |
add first line of commits to debug
-rwxr-xr-x | git-deps | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |