From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Subject: [RFC] Zit: the git-based single file content tracker
Date: Thu, 23 Oct 2008 03:29:08 +0200 [thread overview]
Message-ID: <gdok16$vh2$1@ger.gmane.org> (raw)
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
next reply other threads:[~2008-10-23 1:30 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 1:29 Giuseppe Bilotta [this message]
2008-10-23 12:33 ` [RFC] Zit: the git-based single file content tracker 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gdok16$vh2$1@ger.gmane.org' \
--to=giuseppe.bilotta@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).