X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=strbuf.h;h=fc40873b65124fc98a2e06150b7c8043f05ed4ab;hb=02561896de9d4cd2354e825bf7e6304a3c19d1c3;hp=bf18fddb5bb7883c089b30cfabc54cc5a9d055b9;hpb=da3e0752cdfe7ae535b4e740f162f1e4926d4201;p=thirdparty%2Fgit.git diff --git a/strbuf.h b/strbuf.h index bf18fddb5b..fc40873b65 100644 --- a/strbuf.h +++ b/strbuf.h @@ -190,6 +190,9 @@ void strbuf_ltrim(struct strbuf *sb); /* Strip trailing directory separators */ void strbuf_trim_trailing_dir_sep(struct strbuf *sb); +/* Strip trailing LF or CR/LF */ +void strbuf_trim_trailing_newline(struct strbuf *sb); + /** * Replace the contents of the strbuf with a reencoded form. Returns -1 * on error, 0 on success. @@ -582,10 +585,12 @@ void strbuf_add_unique_abbrev(struct strbuf *sb, * run in. If the buffer is NULL the editor is launched as usual but the * file's contents are not read into the buffer upon completion. */ -int launch_editor(const char *path, - struct strbuf *buffer, +int launch_editor(const char *path, struct strbuf *buffer, const char *const *env); +int launch_sequence_editor(const char *path, struct strbuf *buffer, + const char *const *env); + void strbuf_add_lines(struct strbuf *sb, const char *prefix, const char *buf,