On Sun, Oct 08, 2017 at 02:49:41PM -0400, Derrick Stolee wrote:
> +static inline char get_hex_char_from_oid(const struct object_id *oid,
> + int pos)
> +{
> + static const char hex[] = "0123456789abcdef";
> +
> + if ((pos & 1) == 0)
> + retu
Create get_hex_char_from_oid() to parse oids one hex character at a
time. This prevents unnecessary copying of hex characters in
extend_abbrev_len() when finding the length of a common prefix.
Signed-off-by: Derrick Stolee
---
sha1_name.c | 14 --
1 file changed, 12 insertions(+), 2
2 matches
Mail list logo