On Thu, Sep 01, 2011 at 06:50:01PM +0200, Michał Górny wrote: > - buf = strchr(buf, '\n'); > - if (!buf) { > - *body = ""; > - return; /* no body */ > - } > - while (*buf == '\n') > - buf++; /* skip blank between subject and body */ > - *body = buf; > + buf = format_subject(NULL, buf, NULL); > + > + /* When having a signed tag without body, format_subject() > + * will start to eat the signature. */ > + if (buf > *signature) > + *body = *signature; > + else /* - 1 to get a trailing newline to strip */ > + *body = buf - 1; This last line is wrong if there is no trailing newline, no? Running even the existing tests in t6300 against your new patch, I get: expecting success: git for-each-ref --format='%(subject)' refs/heads/master >actual && test_cmp expected actual --- expected 2011-09-02 16:36:38.306058729 +0000 +++ actual 2011-09-02 16:36:38.318058729 +0000 @@ -1 +1 @@ -Initial +Initia not ok - 28 basic atom: head subject -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