diff options
author | Pratik Karki <predatoramigo@gmail.com> | 2018-09-04 14:59:54 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-09-06 11:56:20 -0700 |
commit | 99d8cc7ce8e5175f15050e0a28d896bd6475bf5f (patch) | |
tree | 1f903d069466e59cc51589acd8f2d3b99141a81b /builtin | |
parent | builtin rebase: support --committer-date-is-author-date (diff) | |
download | tgif-99d8cc7ce8e5175f15050e0a28d896bd6475bf5f.tar.xz |
builtin rebase: support `ignore-whitespace` option
This commit adds support for the `--ignore-whitespace` option
of the rebase command. This option is simply passed to the
`--am` backend.
Signed-off-by: Pratik Karki <predatoramigo@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rebase.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c index 6ce50eae0f..f023fb4339 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -527,6 +527,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) ACTION_SHOW_CURRENT_PATCH, } action = NO_ACTION; int committer_date_is_author_date = 0; + int ignore_whitespace = 0; struct option builtin_rebase_options[] = { OPT_STRING(0, "onto", &options.onto_name, N_("revision"), @@ -542,6 +543,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) {OPTION_NEGBIT, 'n', "no-stat", &options.flags, NULL, N_("do not show diffstat of what changed upstream"), PARSE_OPT_NOARG, NULL, REBASE_DIFFSTAT }, + OPT_BOOL(0, "ignore-whitespace", &ignore_whitespace, + N_("passed to 'git apply'")), OPT_BOOL(0, "signoff", &options.signoff, N_("add a Signed-off-by: line to each commit")), OPT_BOOL(0, "committer-date-is-author-date", @@ -773,6 +776,9 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) options.flags |= REBASE_FORCE; } + if (ignore_whitespace) + strbuf_addstr(&options.git_am_opt, " --ignore-whitespace"); + switch (options.type) { case REBASE_MERGE: case REBASE_INTERACTIVE: |