{"thread":{"id":"19054","subject":"Extra metadata in the commit?","startedAt":"2009-04-24T22:47:55Z","lastAt":"2009-04-25T12:08:22Z","messageCount":5,"participants":["Scott Chacon","Junio C Hamano","Johannes Schindelin","Alex Riesen","Johan Herland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"112254","messageId":"d411cc4a0904241547p64c0af2bycae20cd4b26e43f6@mail.gmail.com","threadId":"19054","inReplyTo":null,"subject":"Extra metadata in the commit?","fromName":"Scott Chacon","fromEmail":"schacon@gmail.com","sentAt":"2009-04-24T22:47:55Z","receivedAt":"2009-04-24T22:47:55Z","isPatch":false,"sender":{"key":"schacon@gmail.com","avatar":"https://gravatar.com/avatar/9b13a8a078e1dcf8588c4eea9554445d51ebed6c41b51f56f4d96738130b05c6?d=mp&s=160"},"body":"Hey all,\n\nI'm working on a hg<->git bidirectional tool using Git as the\ncommunication protocol, so there is a bunch of Hg metadata that I need\nto keep in Git to ensure I can convert commits created in Hg back into\nthe exact same objects after they upload to the Git db and then come\nback down.  This means storing explicit rename info, branch names, etc\nsomewhere without messing up Git clients that want to work on the same\nrepo.  So, I can keep this data in the commit message, but I thought\nit would be cleaner to keep it as extra fields in the commit object\nbefore the \"\\n\\n\" separator.  Before I go too far down this road, is\nthere anything horrible that might happen in any of the core Git tools\nif extra data is there?\n\nThanks,\nScott\n"},{"id":"112256","messageId":"7vws998xdf.fsf@gitster.siamese.dyndns.org","threadId":"19054","inReplyTo":"d411cc4a0904241547p64c0af2bycae20cd4b26e43f6@mail.gmail.com","subject":"Re: Extra metadata in the commit?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-24T23:06:52Z","receivedAt":"2009-04-24T23:06:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Scott Chacon <schacon@gmail.com> writes:\n\n> I'm working on a hg<->git bidirectional tool using Git as the\n> communication protocol, so there is a bunch of Hg metadata that I need\n> to keep in Git to ensure I can convert commits created in Hg back into\n> the exact same objects after they upload to the Git db and then come\n> back down.  This means storing explicit rename info, branch names, etc\n> somewhere without messing up Git clients that want to work on the same\n> repo.  So, I can keep this data in the commit message, but I thought\n> it would be cleaner to keep it as extra fields in the commit object\n> before the \"\\n\\n\" separator.  Before I go too far down this road, is\n> there anything horrible that might happen in any of the core Git tools\n> if extra data is there?\n\nNot that I know of but it is highly unlikely that such a patch will be\naccepted, given the history of discussion around that area.\n"},{"id":"112270","messageId":"alpine.DEB.1.00.0904250154080.10279@pacific.mpi-cbg.de","threadId":"19054","inReplyTo":"d411cc4a0904241547p64c0af2bycae20cd4b26e43f6@mail.gmail.com","subject":"Re: Extra metadata in the commit?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-04-24T23:55:05Z","receivedAt":"2009-04-24T23:55:05Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 24 Apr 2009, Scott Chacon wrote:\n\n> I'm working on a hg<->git bidirectional tool using Git as the \n> communication protocol, so there is a bunch of Hg metadata that I need \n> to keep in Git to ensure I can convert commits created in Hg back into \n> the exact same objects after they upload to the Git db and then come \n> back down.  This means storing explicit rename info, branch names, etc \n> somewhere without messing up Git clients that want to work on the same \n> repo.  So, I can keep this data in the commit message, but I thought it \n> would be cleaner to keep it as extra fields in the commit object before \n> the \"\\n\\n\" separator.\n\nI'd suggest keeping it in the commit body, for better visibility and \neasier handling by tools.\n\nCiao,\nDscho\n"},{"id":"112287","messageId":"81b0412b0904250249k717ae07did24867bd6ca6e8a2@mail.gmail.com","threadId":"19054","inReplyTo":"alpine.DEB.1.00.0904250154080.10279@pacific.mpi-cbg.de","subject":"Re: Extra metadata in the commit?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-04-25T09:49:37Z","receivedAt":"2009-04-25T09:49:37Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"2009/4/25 Johannes Schindelin <Johannes.Schindelin@gmx.de>:\n> On Fri, 24 Apr 2009, Scott Chacon wrote:\n>\n>> I'm working on a hg<->git bidirectional tool using Git as the\n>> communication protocol, so there is a bunch of Hg metadata that I need\n>> to keep in Git to ensure I can convert commits created in Hg back into\n>> the exact same objects after they upload to the Git db and then come\n>> back down.  This means storing explicit rename info, branch names, etc\n>> somewhere without messing up Git clients that want to work on the same\n>> repo.  So, I can keep this data in the commit message, but I thought it\n>> would be cleaner to keep it as extra fields in the commit object before\n>> the \"\\n\\n\" separator.\n>\n> I'd suggest keeping it in the commit body, for better visibility and\n> easier handling by tools.\n>\n\nBTW, by the same convention we treat the very first line of a commit\nmessage specially, we can say that the last line, if non-empty\n(IOW, does not end with \\n), is treated specially by UI tools\n(grayed out, for example):\n\n  Subject\\n\n  \\n\n  Body\\n\n  \\n\n  something:very:special\n"},{"id":"112298","messageId":"200904251408.22410.johan@herland.net","threadId":"19054","inReplyTo":"alpine.DEB.1.00.0904250154080.10279@pacific.mpi-cbg.de","subject":"Re: Extra metadata in the commit?","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2009-04-25T12:08:22Z","receivedAt":"2009-04-25T12:08:22Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Saturday 25 April 2009, Johannes Schindelin wrote:\n> On Fri, 24 Apr 2009, Scott Chacon wrote:\n> > So, I can keep this data in the commit message, but I thought it\n> > would be cleaner to keep it as extra fields in the commit object before\n> > the \"\\n\\n\" separator.\n>\n> I'd suggest keeping it in the commit body, for better visibility and\n> easier handling by tools.\n\nOr even better: Keep it in separate commit notes (provided you can wait for \nthe js/notes topic in pu to make it into a release). If you add the notes \nwith GIT_NOTES_REF=refs/notes/hg_metadata, you will also keep them nicely \nout of the way of everybody else.\n\n(I'm using this approach when building a bidirectional CVS <-> Git helper on \ntop of Barkalow's foreign-scm topic).\n\n\nHave fun! :)\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"}]}