summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c41a802)
raw | patch | inline | side by side (parent: c41a802)
author | Michael Haggerty <mhagger@alum.mit.edu> | |
Sat, 11 Feb 2012 06:20:59 +0000 (07:20 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 13 Feb 2012 03:50:39 +0000 (19:50 -0800) |
Objects in an alternate object database are already available to the
local repository and therefore don't need to be fetched. So mark them
as complete in everything_local().
This fixes a test in t5700.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
local repository and therefore don't need to be fetched. So mark them
as complete in everything_local().
This fixes a test in t5700.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c | patch | blob | history | |
t/t5700-clone-reference.sh | patch | blob | history |
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index dbe9acbc396919eba2e6b5fa6633f6839d15b0c8..0e8560f60f43dd6e971a38381838d217bdc28899 100644 (file)
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
*refs = newlist;
}
+static void mark_alternate_complete(const struct ref *ref, void *unused)
+{
+ mark_complete(NULL, ref->old_sha1, 0, NULL);
+}
+
static int everything_local(struct ref **refs, int nr_match, char **match)
{
struct ref *ref;
if (!args.depth) {
for_each_ref(mark_complete, NULL);
+ for_each_alternate_ref(mark_alternate_complete, NULL);
if (cutoff)
mark_recent_complete_commits(cutoff);
}
index bd7a1d7dbbe40494ac250251b6543ce7153a6370..bbc4691bd7ef1e3633d4a66440211179fae42a84 100755 (executable)
rm -f "$U.K"
-test_expect_failure 'fetch with incomplete alternates' '
+test_expect_success 'fetch with incomplete alternates' '
git init K &&
echo "$base_dir/A/.git/objects" >K/.git/objects/info/alternates &&
(