Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] blame.c: fix garbled error message

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:03:34

Jeff King [off-list ref] writes:
On Wed, Jan 14, 2015 at 09:22:52AM -0800, Junio C Hamano wrote:
...
quoted
And the result should merge just fine to 'maint'.
Are we in agreement then that the resulting code with the helper is
actually easier to read? I think replacing the straight ?: lines is, but
I am on the fence on whether:

  const char *x = some_fun(...);
  return xstrdup_or_null(x);

is better or worse than:

  return xstrdup_or_null(some_fun(....));
I think the latter is fine as long as some_fun(...) invocation does
not get overly long, and even the longest I saw in refs.c, i.e.

        return xstrdup_or_null(resolve_ref_unsafe(ref, resolve_flags, sha1, flags));

did not bother me too much.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help