author | Junio C Hamano <gitster@pobox.com> | |
Sun, 29 Jan 2012 21:18:53 +0000 (13:18 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 29 Jan 2012 21:18:53 +0000 (13:18 -0800) |
* mh/ref-clone-without-extra-refs:
write_remote_refs(): create packed (rather than extra) refs
add_packed_ref(): new function in the refs API.
ref_array: keep track of whether references are sorted
pack_refs(): remove redundant check
write_remote_refs(): create packed (rather than extra) refs
add_packed_ref(): new function in the refs API.
ref_array: keep track of whether references are sorted
pack_refs(): remove redundant check
1 | 2 | |||
---|---|---|---|---|
builtin/clone.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/clone.c
index 9dcc5fe775dc8dd38bb905869ee87a9dc685dfcf,9413537a8e0f67b5d2e21cf133088f470cb26cb3..9084febb1428a4232b43d97912c7e3e7dfb9e382
--- 1/builtin/clone.c
--- 2/builtin/clone.c
+++ b/builtin/clone.c
}
pack_refs(PACK_REFS_ALL);
- clear_extra_refs();
}
+static void write_followtags(const struct ref *refs, const char *msg)
+{
+ const struct ref *ref;
+ for (ref = refs; ref; ref = ref->next) {
+ if (prefixcmp(ref->name, "refs/tags/"))
+ continue;
+ if (!suffixcmp(ref->name, "^{}"))
+ continue;
+ if (!has_sha1_file(ref->old_sha1))
+ continue;
+ update_ref(msg, ref->name, ref->old_sha1,
+ NULL, 0, DIE_ON_ERR);
+ }
+}
+
static int write_one_config(const char *key, const char *value, void *data)
{
return git_config_set_multivar(key, value ? value : "true", "^$", 0);