MCPcopy Create free account
hub / github.com/git/git / check_fixup_reword_options

Function check_fixup_reword_options

builtin/commit.c:1295–1307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1293}
1294
1295static void check_fixup_reword_options(int argc, const char *argv[]) {
1296 if (whence != FROM_COMMIT) {
1297 if (whence == FROM_MERGE)
1298 die(_("You are in the middle of a merge -- cannot reword."));
1299 else if (is_from_cherry_pick(whence))
1300 die(_("You are in the middle of a cherry-pick -- cannot reword."));
1301 }
1302 if (argc)
1303 die(_("reword option of '%s' and path '%s' cannot be used together"), "--fixup", *argv);
1304 if (patch_interactive || interactive || all || also || only)
1305 die(_("reword option of '%s' and '%s' cannot be used together"),
1306 "--fixup", "--patch/--interactive/--all/--include/--only");
1307}
1308
1309static int parse_and_validate_options(int argc, const char *argv[],
1310 const struct option *options,

Callers 1

Calls 2

is_from_cherry_pickFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected