aboutsummaryrefslogtreecommitdiff
path: root/lpm.c
diff options
context:
space:
mode:
authorAdam <adamdharrison@gmail.com>2022-10-14 12:06:21 -0400
committerAdam <adamdharrison@gmail.com>2022-10-14 12:06:21 -0400
commit66c5e8e3e80061993642c974909e3563006aaa0a (patch)
treec65bf3a8d8eda8e93ab1bc247c0136a39a7a97d7 /lpm.c
parent7500307e99a128e1cc43c60c4e603b55d482cfe4 (diff)
downloadlite-xl-plugin-manager-66c5e8e3e80061993642c974909e3563006aaa0a.tar.gz
lite-xl-plugin-manager-66c5e8e3e80061993642c974909e3563006aaa0a.zip
Added in tag support.
Diffstat (limited to 'lpm.c')
-rw-r--r--lpm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lpm.c b/lpm.c
index 944a98a..c8584a5 100644
--- a/lpm.c
+++ b/lpm.c
@@ -287,9 +287,7 @@ static git_repository* luaL_checkgitrepo(lua_State* L, int index) {
static git_commit* git_retrieve_commit(git_repository* repository, const char* commit_name) {
git_oid commit_id;
git_commit* commit;
- if (git_get_id(&commit_id, repository, commit_name))
- return NULL;
- if (git_commit_lookup(&commit, repository, &commit_id))
+ if (git_get_id(&commit_id, repository, commit_name) || git_commit_lookup(&commit, repository, &commit_id))
return NULL;
return commit;
}