aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2015-01-11 21:55:36 +0000
committerAdam Spiers <git@adamspiers.org>2015-01-11 23:05:30 +0000
commitc46d924bd01fd4cc571ebaeaceedb533e0988c2b (patch)
tree28e02262187b49cf680b61c0880021f604b77caf
parent2140f74be77513952e3fa3d1e37671efa7080e37 (diff)
downloadgit-deps-c46d924bd01fd4cc571ebaeaceedb533e0988c2b.tar.gz
eliminate needless temporary variable
-rwxr-xr-xgit-deps3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-deps b/git-deps
index 81fbf63..3ff029d 100755
--- a/git-deps
+++ b/git-deps
@@ -163,14 +163,13 @@ class JSONDependencyListener(DependencyListener):
and returns the commit's index in the array.
"""
sha1 = commit.hex
- abbrev = GitUtils.abbreviate_sha1(sha1)
if sha1 in self._commits:
return self._commits[sha1]
title, separator, body = commit.message.partition("\n")
commit = {
'explored': False,
- 'name': abbrev,
'sha1': sha1,
+ 'name': GitUtils.abbreviate_sha1(sha1),
'describe': GitUtils.describe(sha1),
'author_name': commit.author.name,
'author_mail': commit.author.email,