Re: [PATCH] patch-id: use oid_to_hex() to print multiple object IDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-12-07 at 19:16:51, René Scharfe wrote:
> diff --git a/builtin/patch-id.c b/builtin/patch-id.c
> index 3059e525b8..822ffff51f 100644
> --- a/builtin/patch-id.c
> +++ b/builtin/patch-id.c
> @@ -5,13 +5,8 @@
> 
>  static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
>  {
> -	char name[GIT_MAX_HEXSZ + 1];
> -
> -	if (!patchlen)
> -		return;
> -
> -	memcpy(name, oid_to_hex(id), the_hash_algo->hexsz + 1);
> -	printf("%s %s\n", oid_to_hex(result), name);
> +	if (patchlen)
> +		printf("%s %s\n", oid_to_hex(result), oid_to_hex(id));
>  }
> 
>  static int remove_space(char *line)

This seems like a nice cleanup to me.  Thanks for sending the patch.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux