From: Jon Seymour <jon.seymour@gmail.com>
To: Johan Herland <johan@herland.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: A generalization of git notes from blobs to trees - git metadata?
Date: Sun, 7 Feb 2010 15:32:05 +1100 [thread overview]
Message-ID: <2cfc40321002062032g1e0afd66la7ac4a26295bd817@mail.gmail.com> (raw)
In-Reply-To: <2cfc40321002061927m522f0c3aj7d727c47a2f0cb22@mail.gmail.com>
Another use case could be to store the contents of the man and html
trees of git, which are currently published as separate branches.
With the metadata concept, the man and html trees for each release
could be stored as metadata paths (/man, /html) of the associated
commit for each release, providing a trivial way to address and access
these trees.
jon.
On Sun, Feb 7, 2010 at 2:27 PM, Jon Seymour <jon.seymour@gmail.com> wrote:
>> I still don't see why this provides anything that isn't already supported by
>> either using 'git tag', or by implementing support for notes-as-trees in the
>> notes feature.
>>
>
> The intent of the metadata facility is to associate derivatives of
> sha1 with the sha1 itself. If I have calculated a derivative of sha1
> in the past, then let me reference that derivative using a metadata
> path which I can look up knowing only the sha1 of the input and
> nothing more. Yes, I could create tags of the form
> ${sha1}/metadata-path for all my derived results but really, this
> seems an abuse of the tag facility.
>
> Here's another motivating example:
>
> Suppose git-svn wrote the SVN id it was synched with into structured
> metadata associated with a commit, instead of into the commit message,
> the equivalent of:
>
> echo ${svn-id} | git metadata write-blob ${sha1} svn-id
>
> Which means: for the specified sha1, read a blob from stdin and create
> a metadata item with a metadata path called svn-id
>
> To get it out again, you would write:
>
> git metadata read-blob ${sha1} svn-id
>
> Which says, for the given object ${sha1}, read the blob from the
> metadata tree at path svn-id and write its contents to stdout.
>
> This would avoid cluttering the commit message with the svn-id, avoid
> cluttering the tag space with the info and allow any commit to be
> tagged in this way.
>
> Admittedly similar function could be achieved a little more clumsily
> now with appropriate use of GIT_NOTES_REF or with note subtrees, but I
> share Junio's reservations about trying to generalize notes from
> blobs to trees, given way notes are currently used by the rest of
> infrastructure.
>
> jon.
>
prev parent reply other threads:[~2010-02-07 4:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-06 13:32 A generalization of git notes from blobs to trees - git metadata? Jon Seymour
2010-02-07 1:36 ` Johan Herland
2010-02-07 2:21 ` Junio C Hamano
2010-02-07 5:02 ` Jeff King
2010-02-07 5:36 ` Jon Seymour
2010-02-07 9:15 ` Jakub Narebski
2010-02-07 9:41 ` Jon Seymour
2010-02-07 10:15 ` Jon Seymour
2010-02-07 19:33 ` Jeff King
2010-02-07 20:25 ` Junio C Hamano
2010-02-08 2:03 ` Steven E. Harris
2010-02-10 5:09 ` Jeff King
2010-02-10 5:23 ` Junio C Hamano
2010-02-10 5:29 ` Jeff King
2010-02-07 18:48 ` Junio C Hamano
2010-02-07 19:18 ` Jeff King
2010-02-07 22:46 ` Johan Herland
2010-02-07 3:27 ` Jon Seymour
2010-02-07 4:32 ` Jon Seymour [this message]
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=2cfc40321002062032g1e0afd66la7ac4a26295bd817@mail.gmail.com \
--to=jon.seymour@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johan@herland.net \
/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).