commit d7238a85574051df2f21b9871c88c8de5870cbb5
parent 5461355bc99ff364affb0af6cf83e4e853e369cc
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 16 Mar 2021 15:45:23 +0100
parent 5461355bc99ff364affb0af6cf83e4e853e369cc
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 16 Mar 2021 15:45:23 +0100
showLastCommit.nim: cleanup
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/showLastCommit.nim b/showLastCommit.nim @@ -9,11 +9,10 @@ discard git_libgit2_init() try: let gitRepository = openGitRepository(paramStr(1)) - let headCommit = cast[GitCommit](gitRepository.lookupObject("HEAD^{commit}")) echo "Last commit on HEAD in repo: " & $gitRepository - let commit = cast[GitCommit](headCommit) + let commit = cast[GitCommit](gitRepository.lookupObject("HEAD^{commit}")) let author = commit.getAuthor() echo "hash: " & $commit.getObjectId() @@ -22,7 +21,6 @@ try: echo "message: " & commit.getSummary() free(commit); - free(headCommit); free(gitRepository) except: