git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: martin f krafft <madduck@madduck.net>
To: git discussion list <git@vger.kernel.org>
Subject: Using trees for metatagging
Date: Thu, 18 Feb 2010 17:12:40 +1300	[thread overview]
Message-ID: <20100218041240.GA4127@lapse.rw.madduck.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]

Git's object store uses trees mainly to represent a hierarchical
filesystem. It occurs to me that you could layer additional
hierarchies on top — specifically, you could use it to track subsets
of files, i.e. "tagging".

For instance you want some sort of representation for "the set of
files that need review". You /could/ create a new tree and reference
all files in that set as children. Now if you wanted to find out
what to review, you'd list the children of this tree. After
reviewing a file, you write a new tree with the set less that file's
ref.. Obviously, if you made changes to the file, it should be
reconnected to all other trees that referenced it.

I have a couple of questions about this:

1. Does Git provide plumbing for me to find out which trees
   reference a given blob? If not, I will have to iterate all trees
   and record which ones have a given message as a child.

2. Is there a way you can fathom by which unlinking a blob from the
   main hierarchy also causes it to be unlinked from this meta tree
   I am speaking of as well? Similarly, if a blob is rewritten, how
   could I make sure it replaces the old blob in all referencing
   trees?

3. Am I right in assuming that I'd have to track a completely
   seperate ancestry for this tree, that is create e.g. a commit
   object, point refs/metatrees/mytree to it, and reference the tree
   from the commit?

4. Since this hierarchy is not really to be mapped into the
   filesystem, how would one resolve conflicts when merging
   ancestries? Of course it would be nice if I could check out this
   meta tree into the filesystem, make changes, and be assured that
   new blobs replace old blobs in other referencing trees, as per
   (2.), but that's a pipedream maybe.

5. Do you know of similar efforts? Are there must-reads out there,
   apart from the design of Git?

Thank you,

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
kill ugly radio
                                                        -- frank zappa
 
spamtraps: madduck.bogus@madduck.net

[-- Attachment #2: Digital signature (see http://martin-krafft.net/gpg/) --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2010-02-18  4:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18  4:12 martin f krafft [this message]
2010-02-18 18:57 ` Using trees for metatagging Avery Pennarun
2010-02-18 22:53   ` martin f krafft
2010-02-18 21:00 ` Johan Herland
2010-02-18 22:57   ` martin f krafft
2010-02-18 23:06     ` Avery Pennarun
2010-02-18 23:25       ` martin f krafft
2010-02-18 23:32         ` Avery Pennarun
2010-02-19  0:43     ` Johan Herland

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=20100218041240.GA4127@lapse.rw.madduck.net \
    --to=madduck@madduck.net \
    --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).