Nguyễn Thái Ngọc Duy wrote:
> --separate-git-dir was added to clone with the repository away from
> standard position <worktree>/.git. It does not make sense to use it
> without creating working directory.
>
> Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
The patch correctly implements the above. The description leaves out
detail. I'd say something like
The --separate-git-dir option was introduced to make it simple
to put the git directory somewhere outside the worktree, for
example when cloning a repository for use as a submodule.
It was not intended for use when creating a bare repository.
In that case there is no worktree and it is more natural to
directly clone the repository and create a .git file as
separate steps:
git clone --bare /path/to/repo.git bar.git
printf 'gitdir: bar.git\n' >foo.git
Unfortunately we forgot to forbid the --bare
--separate-git-dir combination. In practice, we know no one
could be using --bare with --separate-git-dir because it is
broken in the following way: <explanation here>. So it is
safe to make good on our mistake and forbid the combination,
making the command easier to explain.
I don't know what would go in the <explanation here> blank above,
though. Is it possible that some people are relying on this option
combination?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html