Re: [PATCHv2] git-log --format: Add %B tag with %B(x) option

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

 



Johannes Gilger <heipei@xxxxxxxxxxxx> 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".


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