diff options
Diffstat (limited to 'builtin/stripspace.c')
-rw-r--r-- | builtin/stripspace.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/builtin/stripspace.c b/builtin/stripspace.c index be33eb8..e5626e5 100644 --- a/builtin/stripspace.c +++ b/builtin/stripspace.c @@ -1,8 +1,11 @@ #include "builtin.h" -#include "cache.h" #include "config.h" +#include "environment.h" +#include "gettext.h" #include "parse-options.h" +#include "setup.h" #include "strbuf.h" +#include "write-or-die.h" static void comment_lines(struct strbuf *buf) { @@ -10,13 +13,13 @@ static void comment_lines(struct strbuf *buf) size_t len; msg = strbuf_detach(buf, &len); - strbuf_add_commented_lines(buf, msg, len); + strbuf_add_commented_lines(buf, msg, len, comment_line_str); free(msg); } static const char * const stripspace_usage[] = { - N_("git stripspace [-s | --strip-comments]"), - N_("git stripspace [-c | --comment-lines]"), + "git stripspace [-s | --strip-comments]", + "git stripspace [-c | --comment-lines]", NULL }; @@ -55,7 +58,8 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix) die_errno("could not read the input"); if (mode == STRIP_DEFAULT || mode == STRIP_COMMENTS) - strbuf_stripspace(&buf, mode == STRIP_COMMENTS); + strbuf_stripspace(&buf, + mode == STRIP_COMMENTS ? comment_line_str : NULL); else comment_lines(&buf); |