git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Eric LeshNext: Julian Phillips
Message 5 of 9 in “contrib/workdir: add a simple script to create a working directory”
  1. contrib/workdir: add a simple script to create a working directoryJulian Phillips, Mar 26, 2007
  2. Junio C HamanoMar 26, 2007
  3. contrib/workdir: add a simple script to create a working directoryJulian Phillips, Mar 26, 2007
  4. Eric LeshMar 27, 2007
  5. Junio C HamanoMar 27, 2007
  6. Julian PhillipsMar 27, 2007
  7. Eric LeshMar 27, 2007
  8. Junio C HamanoMar 27, 2007
  9. contrib/workdir: add a simple script to create a working directoryJulian Phillips, Mar 26, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.