Re: [PATCH] pretty format string support for reflog times

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

 



On Wed, Jul 27, 2016 at 10:46:48AM -0700, Junio C Hamano wrote:

> I am not sure about the latter, i.e. the return value from the
> get_reflog_time_t() function (which I think is misnamed, in that the
> function returns "unsigned long", not "time_t", and should be
> renamed to get_reflog_time()) uses the epoch as a fallback value.
> [...]
> @@ -330,7 +330,7 @@ unsigned long get_reflog_time_t(struct reflog_walk_info *reflog_info)
>  	struct reflog_info *info = get_reflog_info(reflog_info);
>  
>  	if (!info)
> -		return NULL;
> +		return 0;
>  	return gm_time_t(info->timestamp, info->tz);
>  }

Our mails just crossed, but I think returning even "0" is not ideal. We
should probably write nothing to match things like "%gd" and "%gs",
which just eat the placeholder and show nothing when they cannot access
the reflog.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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]