summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libgit2/fetch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libgit2/fetch.c b/src/libgit2/fetch.c
index a015cfbd3..3216b261c 100644
--- a/src/libgit2/fetch.c
+++ b/src/libgit2/fetch.c
@@ -60,7 +60,9 @@ static int mark_local(git_remote *remote)
return -1;
git_vector_foreach(&remote->refs, i, head) {
- /* If we have the object, mark it so we don't ask for it */
+ /* If we have the object, mark it so we don't ask for it.
+ However if we are unshallowing, we need to ask for it
+ even though the head exists locally. */
if (remote->nego.depth != INT_MAX && git_odb_exists(odb, &head->oid))
head->local = 1;
else