Merge branch 'mh/ref-clone-without-extra-refs'

* 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
This commit is contained in:
Junio C Hamano
2012-01-29 13:18:53 -08:00
4 changed files with 40 additions and 11 deletions

View File

@ -464,11 +464,10 @@ static void write_remote_refs(const struct ref *local_refs)
for (r = local_refs; r; r = r->next) {
if (!r->peer_ref)
continue;
add_extra_ref(r->peer_ref->name, r->old_sha1, 0);
add_packed_ref(r->peer_ref->name, r->old_sha1);
}
pack_refs(PACK_REFS_ALL);
clear_extra_refs();
}
static void write_followtags(const struct ref *refs, const char *msg)