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

Re: [PATCH v6 0/6] Move PGP verification out of verify-tag

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:18:50

santiago@nyu.edu writes:
   I'm unsure about the 80-column
   on 4/6, the ternary operator is rather long.
You can do something like this:

        type = sha1_object_info(sha1, NULL);
        if (type != OBJ_TAG)
                return error("%s: cannot verify a non-tag object of type %s.",
                             report_name ?
                             report_name :
                             find_unique_abbrev(sha1, DEFAULT_ABBREV),
                             typename(type));

        buf = read_sha1_file(sha1, &type, &size);
        if (!buf)
                return error("%s: unable to read file.",
                             report_name ?
                             report_name :
                             find_unique_abbrev(sha1, DEFAULT_ABBREV));

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help