git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Giuseppe Bilotta" <giuseppe.bilotta@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] Zit: the git-based single file content tracker
Date: Thu, 23 Oct 2008 20:51:53 +0700	[thread overview]
Message-ID: <fcaeb9bf0810230651j1c02de13j61238c97661c32e9@mail.gmail.com> (raw)
In-Reply-To: <cb7bb73a0810230633r9970a50mbb4ecf3a855c3a21@mail.gmail.com>

On 10/23/08, Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
> On Thu, Oct 23, 2008 at 2:50 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
>  > On 10/23/08, Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
>  >>  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.
>  >
>  > Why not use one .zit repo and track each file on each own branch?.
>
>
> So your proposal is to have a single .zit repo which is actually a git
>  repo and where each additional tracked file becomes its own branch,
>  and zit would take care of switching from branch to branch when zit
>  commands are called?

I don't know if switching is necessary. With one file per pranch, the
index is even not necessary.

>  I think this solution would have a number of problems, apart from
>  being generally quite messy. First of all, moving a file and its
>  history somewhere else means toying around with the history of a much
>  wider repo, whereas the current approach would mean just moving the
>  .zit.file dir together with the file (modulo hardlinks). Non-linear
>  histories for a single file would be more complex to handle, too. And
>  publishing just the history of one file would be damn complex.

The history should be linear. Git (or zit) repository is just a
container for git branches. Each branch contains only one file. Moving
a file history is equivalent to "git push" + "git branch -D".
Something like this (not tested):

cd dst
git init
cd src
git push dst local-branch:remote-branch
git branch -D local-branch
git gc

>  --
>  Giuseppe "Oblomov" Bilotta
>


-- 
Duy

  reply	other threads:[~2008-10-23 13:53 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 [this message]
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=fcaeb9bf0810230651j1c02de13j61238c97661c32e9@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=giuseppe.bilotta@gmail.com \
    /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).