diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-10-26 15:55:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-26 15:55:20 -0700 |
commit | 1ad7c0f6896bf0fa0b1b4965d7395b7ba2695fdc (patch) | |
tree | 8ac018758924a1b437895974529dccbe8bae664c /strbuf.h | |
parent | 0884726b43e356d5710db3d516c788fd0b95a57c (diff) | |
parent | bed4452468cc564adc5ab99dfdbee0eb0f7cfb97 (diff) | |
download | git-1ad7c0f6896bf0fa0b1b4965d7395b7ba2695fdc.tar.gz |
Merge branch 'tk/stripspace'
The internal stripspace() function has been moved to where it
logically belongs to, i.e. strbuf API, and the command line parser
of "git stripspace" has been updated to use the parse_options API.
* tk/stripspace:
stripspace: use parse-options for command-line parsing
strbuf: make stripspace() part of strbuf
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -418,7 +418,16 @@ extern void strbuf_add_absolute_path(struct strbuf *sb, const char *path); * Strip whitespace from a buffer. The second parameter controls if * comments are considered contents to be removed or not. */ -extern void stripspace(struct strbuf *buf, int skip_comments); +extern void strbuf_stripspace(struct strbuf *buf, int skip_comments); + +/** + * Temporary alias until all topic branches have switched to use + * strbuf_stripspace directly. + */ +static inline void stripspace(struct strbuf *buf, int skip_comments) +{ + strbuf_stripspace(buf, skip_comments); +} static inline int strbuf_strip_suffix(struct strbuf *sb, const char *suffix) { |