Re: [PATCH] clone: forbid --bare --separate-git-dir <dir>

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] clone: forbid --bare --separate-git-dir <dir>

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:40

Jonathan Nieder [off-list ref] writes:
Nguyễn Thái Ngọc Duy wrote:
quoted
--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 <redacted>
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?
I do not necessarily think we must say "it happens not to work
already for such and such reasons, lucky us!", but it is indeed a
good idea to think things through, justifying why this cannot be a
regression, and record the fact that we did that thinking, in the
log message.

Thanks.

Re: [PATCH] clone: forbid --bare --separate-git-dir <dir>

From: Duy Nguyen <hidden>
Date: 2016-06-15 22:55:40

On Mon, Jan 7, 2013 at 6:13 AM, Junio C Hamano [off-list ref] wrote:
quoted
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?
I do not necessarily think we must say "it happens not to work
already for such and such reasons, lucky us!", but it is indeed a
good idea to think things through, justifying why this cannot be a
regression, and record the fact that we did that thinking, in the
log message.

Thanks.
I wanted to give a day or two or think about the <explanation here>.
Does "Thanks." mean you have picked up the patch and adjusted the
commit message appropriately, or should I go with my original plan and
resend it later with "explanantion there"?
-- 
Duy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help