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 /builtin/commit.c | |
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 'builtin/commit.c')
-rw-r--r-- | builtin/commit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/commit.c b/builtin/commit.c index 63772d016a..dca09e2c3b 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -775,7 +775,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix, s->hints = 0; if (clean_message_contents) - stripspace(&sb, 0); + strbuf_stripspace(&sb, 0); if (signoff) append_signoff(&sb, ignore_non_trailer(&sb), 0); @@ -1014,7 +1014,7 @@ static int template_untouched(struct strbuf *sb) if (!template_file || strbuf_read_file(&tmpl, template_file, 0) <= 0) return 0; - stripspace(&tmpl, cleanup_mode == CLEANUP_ALL); + strbuf_stripspace(&tmpl, cleanup_mode == CLEANUP_ALL); if (!skip_prefix(sb->buf, tmpl.buf, &start)) start = sb->buf; strbuf_release(&tmpl); @@ -1726,7 +1726,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix) wt_status_truncate_message_at_cut_line(&sb); if (cleanup_mode != CLEANUP_NONE) - stripspace(&sb, cleanup_mode == CLEANUP_ALL); + strbuf_stripspace(&sb, cleanup_mode == CLEANUP_ALL); if (template_untouched(&sb) && !allow_empty_message) { rollback_index_files(); fprintf(stderr, _("Aborting commit; you did not edit the message.\n")); |