Merge branch 'bc/object-id'
authorJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2015 19:17:37 +0000 (12:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Jun 2015 19:17:37 +0000 (12:17 -0700)
for_each_ref() callback functions were taught to name the objects
not with "unsigned char sha1[20]" but with "struct object_id".

* bc/object-id: (56 commits)
struct ref_lock: convert old_sha1 member to object_id
warn_if_dangling_symref(): convert local variable "junk" to object_id
each_ref_fn_adapter(): remove adapter
rev_list_insert_ref(): remove unneeded arguments
rev_list_insert_ref_oid(): new function, taking an object_oid
mark_complete(): remove unneeded arguments
mark_complete_oid(): new function, taking an object_oid
clear_marks(): rewrite to take an object_id argument
mark_complete(): rewrite to take an object_id argument
send_ref(): convert local variable "peeled" to object_id
upload-pack: rewrite functions to take object_id arguments
find_symref(): convert local variable "unused" to object_id
find_symref(): rewrite to take an object_id argument
write_one_ref(): rewrite to take an object_id argument
write_refs_to_temp_dir(): convert local variable sha1 to object_id
submodule: rewrite to take an object_id argument
shallow: rewrite functions to take object_id arguments
handle_one_ref(): rewrite to take an object_id argument
add_info_ref(): rewrite to take an object_id argument
handle_one_reflog(): rewrite to take an object_id argument
...

1  2 
builtin/branch.c
builtin/for-each-ref.c
fetch-pack.c
help.c
http-backend.c
remote.c
sha1_name.c
submodule.c
upload-pack.c
Simple merge
Simple merge
diff --cc fetch-pack.c
Simple merge
diff --cc help.c
Simple merge
diff --cc http-backend.c
Simple merge
diff --cc remote.c
Simple merge
diff --cc sha1_name.c
Simple merge
diff --cc submodule.c
Simple merge
diff --cc upload-pack.c
index 640eae1bbe7e3837bd06b8b5675299f29f7e6021,1cb9a948aa05ac4ba274c1e729e64bdf09c483ea..89e832b64a0548ec79802dfc6911eff9f5c353be
@@@ -733,13 -726,10 +735,13 @@@ static int send_ref(const char *refname
                struct strbuf symref_info = STRBUF_INIT;
  
                format_symref_info(&symref_info, cb_data);
 -              packet_write(1, "%s %s%c%s%s%s%s agent=%s\n",
 +              packet_write(1, "%s %s%c%s%s%s%s%s agent=%s\n",
-                            sha1_to_hex(sha1), refname_nons,
+                            oid_to_hex(oid), refname_nons,
                             0, capabilities,
 -                           allow_tip_sha1_in_want ? " allow-tip-sha1-in-want" : "",
 +                           (allow_unadvertised_object_request & ALLOW_TIP_SHA1) ?
 +                                   " allow-tip-sha1-in-want" : "",
 +                           (allow_unadvertised_object_request & ALLOW_REACHABLE_SHA1) ?
 +                                   " allow-reachable-sha1-in-want" : "",
                             stateless_rpc ? " no-done" : "",
                             symref_info.buf,
                             git_user_agent_sanitized());