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
This commit is contained in:
Junio C Hamano
2024-11-27 07:57:09 +09:00
3 changed files with 5 additions and 3 deletions

View File

@ -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)