From: Junio C Hamano Date: Fri, 5 Jun 2015 19:17:37 +0000 (-0700) Subject: Merge branch 'bc/object-id' X-Git-Tag: v2.5.0-rc0~54 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/5455ee0573a22bb793a7083d593ae1ace909cd4c?ds=inline;hp=--cc Merge branch 'bc/object-id' 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 ... --- 5455ee0573a22bb793a7083d593ae1ace909cd4c diff --cc upload-pack.c index 640eae1bbe,1cb9a948aa..89e832b64a --- a/upload-pack.c +++ b/upload-pack.c @@@ -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());