summaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-10-26 15:55:20 -0700
committerJunio C Hamano <gitster@pobox.com>2015-10-26 15:55:20 -0700
commit1ad7c0f6896bf0fa0b1b4965d7395b7ba2695fdc (patch)
tree8ac018758924a1b437895974529dccbe8bae664c /strbuf.h
parent0884726b43e356d5710db3d516c788fd0b95a57c (diff)
parentbed4452468cc564adc5ab99dfdbee0eb0f7cfb97 (diff)
downloadgit-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.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/strbuf.h b/strbuf.h
index 0f9c8a72ba..7123fca7af 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -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)
{