Re: [RFC] Zit: the git-based single file content tracker
- From
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
- Date
- Oct 25, 2008, 10:30 UTC
- Message-ID
- <cb7bb73a0810250330w39811a29g7b497ec70a3b9085@mail.gmail.com>
- In-Reply-To
- <200810251110.25704.jnareb@gmail.com>
On Sat, Oct 25, 2008 at 11:10 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 12 quoted lines
> On Sat, 25 Oct 2008, Giuseppe Bilotta wrote: > >> The user .zitignore file is probably the best approach: we can create >> it ourselves (usually), and even if Git doesn't expand the pathname >> itself, we can just use an absolute path. I'll go that way. > > First, absolute path to ~/.zitignore is a bit fragile: what if layout > of home directories for users change, for example because of increasing > number of users some fan-out is required (/home/nick -> /home/2/nick)? > Second, ~/.zitignore looks like something that user can change; if > you install zit, it can install libexec/zitignore somewhere... or just > use ./zit/excludes (with 'do not edit' comment perhaps...).
(Actually, I just found another interesting thing about the config, in that it stores the path to the work tree. This is not a problem, though, because zit_setup() sets GIT_WORK_TREE.)
As I said, I don't like depending on stuff that needs to be installed. For example, what about user (non-system) installs? the libexec (or whatever) solution would have the same problem as the ~/.zitignore solution, with the moving $HOME.
I guess this leaves the .zit/ solution as the most robust one, although it's not the most space-effective, especially if you have many directories, each with a single tracked file. On the plus side, going for the .zit/ solution and dropping support for .somefile.git/ means some significant code semplification.
-- Giuseppe "Oblomov" Bilotta