summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b888d61)
raw | patch | inline | side by side (parent: b888d61)
author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 14 Sep 2007 07:31:07 +0000 (03:31 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 19 Sep 2007 10:22:30 +0000 (03:22 -0700) |
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>
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>
builtin-fetch.c | patch | blob | history |
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 64392f317d416e54554f634ece64c380c485c776..c8c24d28a28d3160a4aa1ff401467ff4caaa59e8 100644 (file)
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
strcpy(ref->name, rm->peer_ref->name);
hashcpy(ref->old_sha1, rm->peer_ref->old_sha1);
hashcpy(ref->new_sha1, rm->old_sha1);
- ref->force = rm->force;
+ ref->force = rm->peer_ref->force;
}
commit = lookup_commit_reference(rm->old_sha1);