Re: [PATCH v2 01/17] strbuf: make strbuf_getline_crlf() global

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

 



Hi Junio,

On Wed, 16 Dec 2015, Junio C Hamano wrote:

> Often we read "text" files that are supplied by the end user
> (e.g. commit log message that was edited with $GIT_EDITOR upon
> 'git commit -e'), and in some environments lines in a text file
> are terminated with CRLF.  Existing strbuf_getline() knows to read
> a single line and then strip the terminating byte from the result,
> but it is handy to have a version that is more tailored for a "text"
> input that takes both '\n' and '\r\n' as line terminator (aka
> <newline> in POSIX lingo) and returns the body of the line after
> stripping <newline>.
> 
> Recently reimplemented "git am" uses such a function implemented
> privately; move it to strbuf.[ch] and make it available for others.

... While at it, we fix the formatting of the strbuf_getline() function.

Ciao,
Dscho
--
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]