Merge branch 'nd/clone-no-separate-git-dir-with-bare'

Forbid a useless combination of options to "git clone".

* nd/clone-no-separate-git-dir-with-bare:
  clone: forbid --bare --separate-git-dir <dir>
This commit is contained in:
Junio C Hamano 2013-01-21 20:15:07 -08:00
commit 68434e2879

View File

@ -704,6 +704,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
if (option_origin) if (option_origin)
die(_("--bare and --origin %s options are incompatible."), die(_("--bare and --origin %s options are incompatible."),
option_origin); option_origin);
if (real_git_dir)
die(_("--bare and --separate-git-dir are incompatible."));
option_no_checkout = 1; option_no_checkout = 1;
} }