aboutsummaryrefslogtreecommitdiffstats
path: root/git_deps/gitutils.py
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2016-06-29 19:22:23 +0100
committerAdam Spiers <git@adamspiers.org>2018-05-15 13:42:16 +0100
commit7c462c7184986e16aea1f01726a8cadcf0900168 (patch)
treec466b71aa0c94601025c88f076a70e610191579a /git_deps/gitutils.py
parent2b6428a0e25e4ee54d213adc78d8c39077f1405d (diff)
downloadgit-deps-7c462c7184986e16aea1f01726a8cadcf0900168.tar.gz
move oneline() to gitutils.py
It has nothing to do with DependencyDetector, and this will let us reuse it from git-explode too.
Diffstat (limited to 'git_deps/gitutils.py')
-rw-r--r--git_deps/gitutils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/git_deps/gitutils.py b/git_deps/gitutils.py
index f5d8281..ce80ad5 100644
--- a/git_deps/gitutils.py
+++ b/git_deps/gitutils.py
@@ -49,6 +49,10 @@ class GitUtils(object):
return out
@classmethod
+ def oneline(cls, commit):
+ return commit.message.split('\n', 1)[0]
+
+ @classmethod
def refs_to(cls, sha1, repo):
"""Returns all refs pointing to the given SHA1."""
matching = []