summaryrefslogtreecommitdiff
path: root/src/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote.c')
-rw-r--r--src/remote.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/remote.c b/src/remote.c
index 7c2d99937..8475b1c7b 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -1342,9 +1342,20 @@ static int update_tips_for_spec(
} else {
continue;
}
- } else if (git_refspec_src_matches(spec, head->name) && spec->dst) {
- if (git_refspec_transform(&refname, spec, head->name) < 0)
- goto on_error;
+ } else if (git_refspec_src_matches(spec, head->name)) {
+ if (spec->dst) {
+ if (git_refspec_transform(&refname, spec, head->name) < 0)
+ goto on_error;
+ } else {
+ /*
+ * no rhs mans store it in FETCH_HEAD, even if we don't
+ update anything else.
+ */
+ if ((error = git_vector_insert(&update_heads, head)) < 0)
+ goto on_error;
+
+ continue;
+ }
} else {
continue;
}