Subject: Re: tool and worktree

From: "Shawn O. Pearce" <[email-masked]>
Date: Sun, 8 Feb 2009 11:25:28 -0800

bill lam <[email-masked]> wrote:
> I track /etc using a config
> 
> [core]
> 	repositoryformatversion = 0
> 	filemode = true
> 	bare = false
> 	worktree = /etc
> 	logAllRefUpdates = true
> 	excludesfile =
> 
> But that can not be handled by tools,
> 
> git gui : cannot use funny .git directory .

If someone sends patches for git-gui, maybe.  This use case of
different repository and worktree isn't very common for git-gui
so it doesn't support it.

On Windows with some versions of Tcl/Tk I've had trouble in the
past with Git finding the repository when forked out of the wish
process.  To work around it I just required that the repository
be in ".git".

Have you tried making /etc/.git a symlink to the real repository?

BTW, tracking /etc/ in git won't track permissions and ownership
so restoring /etc from git isn't enough on its own.  Usually I
use some sort of shell script to copy /etc to another location
and check it into git, and a different script to go the other way,
with that script handling mode and ownership as it goes.

-- 
Shawn.