Re: [PATCH] contrib/workdir: add a simple script to create a working directory
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 27, 2007, 04:13 UTC
- Message-ID
- <7v4po7tjbg.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <1174963350.6018.3.camel@localhost>
Eric Lesh <eclesh@ucla.edu> writes:
Show 6 quoted lines
> On Tue, 2007-03-27 at 00:15 +0100, Julian Phillips wrote:
>> +# want to make sure that what is pointed to has a .git directory ...
>> +test -d ${orig_git}/.git || die "${original_git} is not a git repository!";
>> +
>
> Shouldn't this be made to work with bare repositories as well?I think you could enhance Julian's script for that.
But you need to be careful that bare and non-bare repositories are often of quite different nature. The script might need to decide which parts to borrow from the original and which parts to have in the borrowing repository depending on that.
For example, a bare repository by default does not have reflog, but a working tree that borrows from the bare repository might want to enable reflog. In such a case, creating a symlink to orig.git/logs/refs would not be sufficient, and you would either want to enable reflog for the original bare repository and/or have .git/logs/refs hierarchy as a non-symlinked, real directory of your own.