summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@vercel.com>2023-02-25 23:15:43 +0000
committerEdward Thomson <ethomson@vercel.com>2023-02-25 23:22:32 +0000
commitcd40b9186311516ab69c778c5f676f20c28435ed (patch)
tree210bcf4ab9d87a59c8182a56e48c72e3f61b2852
parent8a871d13b7f4e186b8ad943ae5a7fcf30be52e67 (diff)
downloadlibgit2-cd40b9186311516ab69c778c5f676f20c28435ed.tar.gz
remote: always populate old id in update tips
In b1e83cca1bbc255627950b4e8d4fdb1174bf7a12 we erroneously stopped setting the old ID to zero; correct that.
-rw-r--r--src/libgit2/remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libgit2/remote.c b/src/libgit2/remote.c
index ab6b5edbc..c3e2a324d 100644
--- a/src/libgit2/remote.c
+++ b/src/libgit2/remote.c
@@ -1733,7 +1733,7 @@ static int update_ref(
const git_remote_callbacks *callbacks)
{
git_reference *ref;
- git_oid old_id;
+ git_oid old_id = GIT_OID_SHA1_ZERO;
int error;
error = git_reference_name_to_id(&old_id, remote->repo, ref_name);