git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Zit: the git-based single file content tracker
@ 2008-10-23  1:29 Giuseppe Bilotta
  2008-10-23 12:33 ` Felipe Oliveira Carvalho
                   ` (4 more replies)
  0 siblings, 5 replies; 38+ messages in thread
From: Giuseppe Bilotta @ 2008-10-23  1:29 UTC (permalink / raw)
  To: git

Hello all,

one of the common remarks done about git is that since it tracks
tree contents, it's not the best-suited tool to track a bunch of
independent files which happen to be in the same directory.

I've found myself in the situation of wanting to track my changes done
to one or more 'single' files in a directory (e.g. $HOME), and
deciding to use antiquate, clumsy, slow and inefficient but file-based
RCS (yes, you read that right) over git.

In other situations (e.g. for my UserJS folder) I ended up using git,
but not liking the idea of having things such as tags referring to all
of my UserJS projects instead of the single file they were inteded
for, or having to put 'filename: ' at the beginning of commit messages
just because the history was shared.

So today I decided to start hacking at a git-based but file-oriented
content tracker, which I decided to name Zit.

The principle is extremely simple: when you choose to start tracking a
file with Zit,

zit track file

Zit will create a directory .zit.file to hold a git repository
tracking the single file .zit.file/file, which is just a hard link to
file.

The reason for using .zit.file as a non-bare repository rather than
just a GIT_DIR is that it allows things such as 'git status' to ignore
everything else. A possible alternative could have been to use
.zit.file as the GIT_DIR and create an all-encopassing
.zit.file/info/exclude, but the general idea of having this kind of
detached GIT_DIR felt less robust (or maybe I just forgot some
export).

I also don't like the idea of the hardlink, first of all because of
portability problems, and secondly because of the way too many
possibility that the hardlink broke somewhere along the way. For
example, I haven't tested any fancy git commands on my sample zit
implementation, and I'm not sure checking out some older version would
actually work.

If anybody is intered in trying out my quick hack for the idea,
there's a git repository for Zit at git://git.oblomov.eu/zit --beware
that nothing past the most elementary uses (i.e. diff, status, log,
commit) has been tested yet. Many commands are bound to fail due to
the braindead way commands are delegated to git.

Suggestions on the best way to approach the many limits of the
implementation are more than welcome.

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2008-10-26 22:17 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-23  1:29 [RFC] Zit: the git-based single file content tracker Giuseppe Bilotta
2008-10-23 12:33 ` Felipe Oliveira Carvalho
2008-10-23 12:50 ` Nguyen Thai Ngoc Duy
2008-10-23 13:33   ` Giuseppe Bilotta
2008-10-23 13:51     ` Nguyen Thai Ngoc Duy
2008-10-23 14:21       ` Giuseppe Bilotta
2008-10-23 13:03 ` Johannes Sixt
2008-10-23 13:28   ` Giuseppe Bilotta
2008-10-24 17:44   ` Johannes Schindelin
2008-10-24 17:48     ` Giuseppe Bilotta
2008-10-23 17:22 ` [RFC] Zit (v2): " Giuseppe Bilotta
2008-10-24  6:21   ` david
2008-10-24  7:14     ` Giuseppe Bilotta
2008-10-24 10:43   ` Jakub Narebski
2008-10-24 11:01     ` Giuseppe Bilotta
2008-10-26 15:20       ` Jakub Narebski
2008-10-26 21:18         ` Giuseppe Bilotta
2008-10-26 22:04           ` Jakub Narebski
2008-10-26 22:16             ` Giuseppe Bilotta
2008-10-23 23:23 ` [RFC] Zit: " Jean-Luc Herren
2008-10-24  6:55   ` Giuseppe Bilotta
2008-10-24 10:31     ` Jakub Narebski
2008-10-24 10:52       ` Giuseppe Bilotta
2008-10-24 11:32         ` Jakub Narebski
2008-10-24 12:15           ` Giuseppe Bilotta
2008-10-24 18:28       ` Junio C Hamano
2008-10-24 19:11         ` david
2008-10-24 19:42           ` Giuseppe Bilotta
2008-10-24 19:46             ` david
2008-10-24 19:51               ` Giuseppe Bilotta
2008-10-24 19:54                 ` david
2008-10-24 20:13                   ` Giuseppe Bilotta
2008-10-24 20:30                     ` Jakub Narebski
2008-10-25  7:48                       ` Giuseppe Bilotta
2008-10-25  9:10                         ` Jakub Narebski
2008-10-25 10:30                           ` Giuseppe Bilotta
2008-10-24 19:53         ` david
2008-10-24 20:06           ` Giuseppe Bilotta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).