git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
To: git@vger.kernel.org
Subject: [RFC] Zit (v2): the git-based single file content tracker
Date: Thu, 23 Oct 2008 19:22:48 +0200	[thread overview]
Message-ID: <gdqbta$rhe$1@ger.gmane.org> (raw)
In-Reply-To: gdok16$vh2$1@ger.gmane.org

I decided to give the simpler GIT_DIR approach another go.

The reworked Zit ( git://git.oblomov.eu/zit ) works by creating
.file.git/ to track file's history. .file.git/info/excludes is
initialized to the very strong '*' pattern to ensure that things such
as git status etc only consider the actually tracked file.

The obvious advantage over the previous implementation is that we
don't rely on fragile and non-portable hardlinks. The disadvantage
is that something really bad can happen if a command fails to obey
GIT_DIR or GIT_WORK_TREE correctly.

Command delegation is made a little smarter:

zit somecommand file [args...]

gets delegated to

git somecommand [args...]

with GIT_DIR=.file.git and GIT_WORK_TREE="`pwd`", which works
surprisingly well. To prevent stupid expressions such as zit add file
file or zit commit file file, add and commit put the filename back at
the end of the parameter list.

Commands that seem to work correctly so far are init, add, log,
status, diff, remote, push, pull, and even rebase -i.

Commands that definitely need some work are rm (should it just remove
the .file.git/ dir?) and mv (hairy: we would need to rename .file.git
to .newname.git too, but rollbacks are likely to break things).

The only new command introduced by zit is zit list, which lists all
zit-tracked files in the current directory, currently in a very
braindead way (e.g. I'd like it to display the proper status, such as
C M or whatever; suggestions welcome).

On the TODO list is also some smart way to guess which file we're
talking about when no file is specified. Basically, the idea is to
check if there's only one tracked file, or only one changed tracked
file, and allow a missing file option in that case.

As usual, comments suggestions and critiques welcome.

-- 
Giuseppe "Oblomov" Bilotta

  parent reply	other threads:[~2008-10-23 17:24 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Giuseppe Bilotta [this message]
2008-10-24  6:21   ` [RFC] Zit (v2): " 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='gdqbta$rhe$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).