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

Rename get_commit to get_commit_hash #148

Merged
merged 1 commit into from
May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -320,7 +319,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