src/trailer.c


Log

Author Commit Date CI Message
Patrick Steinhardt 08699541 2019-08-08T10:46:42 trailer: check for memory allocation errors The "trailer.c" code has been copied mostly verbatim from git.git with minor adjustments, only. As git.git's `xmalloc` function, which aborts on memory allocation errors, has been swapped out for `git_malloc`, which doesn't abort, we may inadvertently access `NULL` pointers. Add checks to fix this.
Edward Thomson cfd44d6a 2019-05-20T07:57:46 trailer: use size_t for sizes
Patrick Steinhardt 9994cd3f 2018-06-25T11:56:52 treewide: remove use of C++ style comments C++ style comment ("//") are not specified by the ISO C90 standard and thus do not conform to it. While libgit2 aims to conform to C90, we did not enforce it until now, which is why quite a lot of these non-conforming comments have snuck into our codebase. Do a tree-wide conversion of all C++ style comments to the supported C style comments to allow us enforcing strict C90 compliance in a later commit.
Brian Lopez d4a3a4b5 2018-01-17T12:52:08 rename find_trailer to extract_trailer_block
Brian Lopez d43974fb 2018-01-16T13:40:26 Change trailer API to return a simple array
Brian Lopez f315cd14 2018-01-03T18:44:12 make separators const a macro as well
Brian Lopez 1cda43ba 2018-01-03T18:30:04 make comment_line_char const a macro
Charlie Somerville 72fbf05c 2017-12-20T15:24:30 trailer: use git__prefixcmp instead of starts_with
Charlie Somerville 13722611 2017-12-20T15:24:23 trailer: remove inline specifier on is_blank_line
Charlie Somerville 1c43edca 2017-12-14T18:37:10 message: add routine for parsing trailers from messages This is implemented in trailer.c and borrows a large amount of logic from Git core to ensure compatibility.