aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/replay.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-02-14 17:53:47 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-14 17:53:48 -0800
commit5785d9143bcb3ef19452a83bc2e870ff3d5ed95a (patch)
tree03d6edd344fee12ea80680126b49700202fa5816 /builtin/replay.c
parent0cc13007e5d50b096c95047680ace56749c18789 (diff)
parent337855629f59a3f435dabef900e22202ce8e00e1 (diff)
downloadgit-5785d9143bcb3ef19452a83bc2e870ff3d5ed95a.tar.gz
Merge branch 'tc/clone-single-revision'
"git clone" learned to make a shallow clone for a single commit that is not necessarily be at the tip of any branch. * tc/clone-single-revision: builtin/clone: teach git-clone(1) the --revision= option parse-options: introduce die_for_incompatible_opt2() clone: introduce struct clone_opts in builtin/clone.c clone: add tags refspec earlier to fetch refspec clone: refactor wanted_peer_refs() clone: make it possible to specify --tags clone: cut down on global variables in clone.c
Diffstat (limited to 'builtin/replay.c')
-rw-r--r--builtin/replay.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/builtin/replay.c b/builtin/replay.c
index 1afc6d1ee0..032c172b65 100644
--- a/builtin/replay.c
+++ b/builtin/replay.c
@@ -163,9 +163,10 @@ static void determine_replay_mode(struct rev_cmdline_info *cmd_info,
get_ref_information(cmd_info, &rinfo);
if (!rinfo.positive_refexprs)
die(_("need some commits to replay"));
- if (onto_name && *advance_name)
- die(_("--onto and --advance are incompatible"));
- else if (onto_name) {
+
+ die_for_incompatible_opt2(!!onto_name, "--onto",
+ !!*advance_name, "--advance");
+ if (onto_name) {
*onto = peel_committish(onto_name);
if (rinfo.positive_refexprs <
strset_get_size(&rinfo.positive_refs))