Skip to content

Commit 96db173

Browse files
ossilatorgitster
authored andcommitted
rebase: move parse_opt_keep_empty() down
This moves it right next to parse_opt_empty(), which is a much more logical place. As a side effect, this removes the need for a forward declaration of imply_merge(). Signed-off-by: Oswald Buddenhagen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 37e80a2 commit 96db173

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

builtin/rebase.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -376,19 +376,6 @@ static int run_sequencer_rebase(struct rebase_options *opts)
376376
return ret;
377377
}
378378

379-
static void imply_merge(struct rebase_options *opts, const char *option);
380-
static int parse_opt_keep_empty(const struct option *opt, const char *arg,
381-
int unset)
382-
{
383-
struct rebase_options *opts = opt->value;
384-
385-
BUG_ON_OPT_ARG(arg);
386-
387-
imply_merge(opts, unset ? "--no-keep-empty" : "--keep-empty");
388-
opts->keep_empty = !unset;
389-
return 0;
390-
}
391-
392379
static int is_merge(struct rebase_options *opts)
393380
{
394381
return opts->type == REBASE_MERGE;
@@ -982,6 +969,18 @@ static enum empty_type parse_empty_value(const char *value)
982969
die(_("unrecognized empty type '%s'; valid values are \"drop\", \"keep\", and \"ask\"."), value);
983970
}
984971

972+
static int parse_opt_keep_empty(const struct option *opt, const char *arg,
973+
int unset)
974+
{
975+
struct rebase_options *opts = opt->value;
976+
977+
BUG_ON_OPT_ARG(arg);
978+
979+
imply_merge(opts, unset ? "--no-keep-empty" : "--keep-empty");
980+
opts->keep_empty = !unset;
981+
return 0;
982+
}
983+
985984
static int parse_opt_empty(const struct option *opt, const char *arg, int unset)
986985
{
987986
struct rebase_options *options = opt->value;

0 commit comments

Comments
 (0)