Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Rename get_commit to get_commit_hash
Browse files Browse the repository at this point in the history
Signed-off-by: Major Hayden <[email protected]>
  • Loading branch information
major authored and spbnick committed May 22, 2018
1 parent f077bf2 commit f5ffadb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions skt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ def get_commit_date(self, ref=None):

return int(stdout.rstrip())

# FIXME Rename to say the hash is being retrieved
def get_commit(self, ref=None):
def get_commit_hash(self, ref=None):
"""
Get the full hash of the commit pointed at by the specified reference,
or of the currently checked-out commit, if not specified.
Expand Down Expand Up @@ -260,7 +259,7 @@ def checkout(self):
self.git_cmd("checkout", "-q", "--detach", dstref)
self.git_cmd("reset", "--hard", dstref)

head = self.get_commit()
head = self.get_commit_hash()
self.info.append(("base", self.uri, head))
logging.info("baserepo %s: %s", self.ref, head)
return str(head).rstrip()
Expand Down Expand Up @@ -322,7 +321,7 @@ def merge_git_ref(self, uri, ref="master"):
logging.getLogger().level > logging.DEBUG else {}

self.git_cmd("merge", "--no-edit", dstref, **grargs)
head = self.get_commit(dstref)
head = self.get_commit_hash(dstref)
self.info.append(("git", uri, head))
logging.info("%s %s: %s", rname, ref, head)
except subprocess.CalledProcessError:
Expand Down
2 changes: 1 addition & 1 deletion skt/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def cmd_merge(cfg):

kpath = ktree.getpath()
buildinfo = ktree.dumpinfo()
buildhead = ktree.get_commit()
buildhead = ktree.get_commit_hash()

save_state(cfg, {'workdir': kpath,
'buildinfo': buildinfo,
Expand Down

0 comments on commit f5ffadb

Please sign in to comment.