[PATCH v2 0/6] clean up author parsing
- From
Jeff King <peff@peff.net>
- Date
- Aug 27, 2014, 07:55 UTC
- Message-ID
- <20140827075503.GA19521@peff.net>
This is a re-roll of my series from June:
http://thread.gmane.org/gmane.comp.version-control.git/252055
The goal is to clean up some ad-hoc parsing code. Besides reusing code, this fixes some memory leaks, fixes some bad pointer math in determine_author_info, and protects us against getenv() implementations that use a static buffer.
This iteration incorporates feedback from the Eri[ck]s (particularly the last patch, which is much simplified). In addition, I dropped the patch that converted split_ident's pairs of pointers into a struct. It caused quite a bit of noise through the code base, and only saved us a few lines in the end (actually no lines -- it just made a few lines shorter).
The original was also based on another pending series in 'next', which has since graduated to master. This one is based directly on master.
[1/6]: commit: provide a function to find a header in a buffer [2/6]: record_author_info: fix memory leak on malformed commit [3/6]: record_author_info: use find_commit_header [4/6]: use strbufs in date functions [5/6]: determine_author_info: reuse parsing functions [6/6]: determine_author_info: copy getenv output
-Peff