summaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-11-27 07:57:09 +0900
committerJunio C Hamano <gitster@pobox.com>2024-11-27 07:57:09 +0900
commit1f3d9b981465a8320878c725d2dd5924f452e786 (patch)
tree8c0b97ee1c8e8b4d6464f0eaa7d4e4090c4e8d05 /builtin/index-pack.c
parent8eaa06590fe916d4f2baa1fdb93959f1cfa9ab47 (diff)
parent1f2be8bed66dc5911fbbf725246ff0e7dcc209a6 (diff)
Merge branch 'jt/index-pack-allow-promisor-only-while-fetching'
We now ensure "index-pack" is used with the "--promisor" option only during a "git fetch". * jt/index-pack-allow-promisor-only-while-fetching: index-pack: teach --promisor to forbid pack name
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index d8f9360222..95babdc5ea 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1970,6 +1970,8 @@ int cmd_index_pack(int argc,
usage(index_pack_usage);
if (fix_thin_pack && !from_stdin)
die(_("the option '%s' requires '%s'"), "--fix-thin", "--stdin");
+ if (promisor_msg && pack_name)
+ die(_("--promisor cannot be used with a pack name"));
if (from_stdin && !startup_info->have_repository)
die(_("--stdin requires a git repository"));
if (from_stdin && hash_algo)