]> git.ipfire.org Git - thirdparty/git.git/commit - strbuf.h
strbuf: make strbuf_complete_line more generic
authorJeff King <peff@peff.net>
Thu, 24 Sep 2015 21:05:43 +0000 (17:05 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Sep 2015 17:18:18 +0000 (10:18 -0700)
commit399ad553ce87fca77a9bc5a0e734a361a9e8a5a3
treea095f0c903c94fba7a506970f91ce68d87b2fc05
parentbb3788cebb814aa003941abcf484da872aa61412
strbuf: make strbuf_complete_line more generic

The strbuf_complete_line function makes sure that a buffer
ends in a newline. But we may want to do this for any
character (e.g., "/" on the end of a path). Let's factor out
a generic version, and keep strbuf_complete_line as a thin
wrapper.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
strbuf.h