From: Junio C Hamano Date: Fri, 18 Sep 2009 19:12:39 GMT Subject: Re: [PATCHv2] git-log --format: Add %B tag with %B(x) option Message-ID: <7vtyz083tk.fsf@alter.siamese.dyndns.org> In-Reply-To: <1253296845-17219-1-git-send-email-heipei@hackvalue.de> Johannes Gilger writes: > %B(c5) is simply no ident, while %B(5c) is 5 spaces indent. Don't know if this > is unwanted behaviour, but that's what strtol gives us. Not really. "strto[u]l(arg, &endp, 10)" parses arg as a decimal and moves "char *endp" to point at where the number ended, so you can tell things like: - return value of 0 with (arg == endp) being "an empty input, the user did not necessarily meant zero"; or - (*endp != '\0') being "some garbage after the number".