summaryrefslogtreecommitdiff
path: root/src/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c
index 550963e56..c42968359 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -115,6 +115,9 @@ int git_reference_dup(git_reference **dest, git_reference *source)
GITERR_CHECK_ALLOC(*dest);
+ (*dest)->db = source->db;
+ GIT_REFCOUNT_INC((*dest)->db);
+
return 0;
}