git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Storing (hidden) per-commit metadata

From
Avery Pennarun <apenwarr@gmail.com>
Date
Feb 20, 2010, 18:57 UTC
Message-ID
<32541b131002201057t31fc8a6aydb0942171fe1b8c8@mail.gmail.com>
In-Reply-To
<1266687636-sup-7641@ben-laptop>
On Sat, Feb 20, 2010 at 12:41 PM, Ben Gamari <bgamari@gmail.com> wrote:
Show 10 quoted lines
> Excerpts from Jelmer Vernooij's message of Fri Feb 19 12:11:25 -0500 2010:
>> To allow round-tripping pushes from Bazaar into Git, I'm looking for a
>> good place to store Bazaar semantics that can not be represented in Git
>> at the moment. This data should ideally be hidden from the user as much
>> as possible; it would e.g. contain mappings from git hashes to Bazaar
>> ids.
>>
> Are you sure you want to hide this? I believe git-svn puts this
> information in its commit messages (although I don't know whether it's
> stored elsewhere as well).

Note that git-svn doesn't store *all* the stuff from svn in the git repository. So you couldn't, for example, regenerate an svn repo identical to the original from its git-svn clone. This limitation is rarely noticed since the stuff git-svn doesn't store is stuff that git mostly does differently/automatically/etc. But that's why git-svn can get away with cluttering your commit messages with "only" one line of git-svn cruft each.

However, this does bring up the question: how important is it *really* to be able to "round trip" from bzr to git and back without losing information? Maybe you only need to store enough information to pull from bzr and then push back your commits.

As for git-notes, they sound like they would be useful for this sort of thing. I haven't tried them yet, but my understanding is that notes anywhere other than the "default" notes ref are not shown in commit messages, so you can use them for whatever you want.

Have fun,
Avery
Previous: Ben GamariNext: Jeff King
Message 3 of 19 in “Storing (hidden) per-commit metadata”
  1. Jelmer VernooijFeb 19, 2010
  2. Ben GamariFeb 20, 2010
  3. Avery PennarunFeb 20, 2010
  4. Jeff KingFeb 21, 2010
  5. Johannes SchindelinFeb 21, 2010
  6. Jeff KingFeb 21, 2010
  7. Jelmer VernooijFeb 21, 2010
  8. Dmitry PotapovFeb 22, 2010
  9. Jelmer VernooijFeb 22, 2010
  10. Dmitry PotapovFeb 22, 2010
  11. Jelmer VernooijFeb 22, 2010
  12. Dmitry PotapovFeb 22, 2010
  13. Jelmer VernooijFeb 22, 2010
  14. Dmitry PotapovFeb 22, 2010
  15. Jelmer VernooijFeb 22, 2010
  16. Jelmer VernooijFeb 22, 2010
  17. Gabriel FilionFeb 22, 2010
  18. Jelmer VernooijFeb 22, 2010
  19. Alejandro R. SedeñoFeb 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.