summaryrefslogtreecommitdiff
path: root/git-merge-octopus.sh
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2017-10-31 14:50:06 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-01 10:35:40 +0900
commit62a24c8923274b0ef941b2e7bc6efdb2fd52e6bf (patch)
tree2138a969160f43427320569dc08d4b231fdc08d7 /git-merge-octopus.sh
parenthttp-push: use hex_to_bytes() (diff)
downloadtgif-62a24c8923274b0ef941b2e7bc6efdb2fd52e6bf.tar.xz
sha1_file: use hex_to_bytes()
The path of a loose object contains its hash value encoded into two substrings of 2 and 38 hexadecimal digits separated by a slash. The first part is handed to for_each_file_in_obj_subdir() in decoded form as subdir_nr. The current code builds a full hexadecimal representation of the hash in a temporary buffer, then uses get_oid_hex() to decode it. Avoid the intermediate step by taking subdir_nr as-is and using hex_to_bytes() directly on the second substring. That's shorter and easier. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-merge-octopus.sh')
0 files changed, 0 insertions, 0 deletions