Correct builtin-fetch to handle + in refspecs
If we are fetching to a local reference (the so called peer_ref) and the refspec that created this ref/peer_ref association had started with '+' we are supposed to allow a non-fast-forward update during fetch, even if --force was not supplied on the command line. The builtin-fetch implementation was not honoring this setting as it was copied from the wrong struct ref instance. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shawn O. Pearce committed
Sep 14, 2007 at 03:31 UTC
1aad91f5a715af92892aea7764beb829938ab111
1 file changed
+1
-1
builtin-fetch.c
+1
-1
@@ -217,7 +217,7 @@ static void store_updated_refs(const char *url, struct ref *ref_map)
217
strcpy(ref->name, rm->peer_ref->name);
218
hashcpy(ref->old_sha1, rm->peer_ref->old_sha1);
219
hashcpy(ref->new_sha1, rm->old_sha1);
220
- ref->force = rm->force;
220
+ ref->force = rm->peer_ref->force;
221
}
222
223
commit = lookup_commit_reference(rm->old_sha1);