{"thread":{"id":"22558","subject":"notes metadata?","startedAt":"2010-02-07T11:50:14Z","lastAt":"2010-02-08T10:32:08Z","messageCount":4,"participants":["Giuseppe Bilotta","Jon Seymour","Johan Herland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"133869","messageId":"cb7bb73a1002070350j750287abl43de4d936a47acef@mail.gmail.com","threadId":"22558","inReplyTo":null,"subject":"notes metadata?","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-02-07T11:50:14Z","receivedAt":"2010-02-07T11:50:14Z","isPatch":false,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"Hello all,\n\nok, this may sound a little odd especially with the 'notes vs\nmetadata' thread going on, but I was wondering: do we store _any_ kind\nof metadata _about_ the notes themselves? If I'm reading the code\ncorrectly, we have neither author nor date information about the notes\nthemselves, so we don't know who added them or when. Is it too late to\nsuggest that this kind of metadata be added to notes? Making them\nfull-blown commit-style objects is probalby overengineered and wrong\nunder many points of view (not to mention probably incompatible with\ncurrent storage), but maybe we can set up a convention that notes\nSHOULD be in pseudo-mbox format? This would mean that when a note is\ncreated, the template starts with a 'From ' line including the user's\nname &  email and note creation date; when editing, the note is again\naugmented with the new author name email and date. Of course the users\nare then free do expunge the From lines if they don't want it (just\ncommenting it would be enough, of course). How does the idea sound?\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"},{"id":"133873","messageId":"2cfc40321002070527v3649add4sccbc771d3a51f9e2@mail.gmail.com","threadId":"22558","inReplyTo":"cb7bb73a1002070350j750287abl43de4d936a47acef@mail.gmail.com","subject":"Re: notes metadata?","fromName":"Jon Seymour","fromEmail":"jon.seymour@gmail.com","sentAt":"2010-02-07T13:27:28Z","receivedAt":"2010-02-07T13:27:28Z","isPatch":false,"sender":{"key":"jon.seymour@gmail.com","avatar":"https://avatars.githubusercontent.com/u/207131?v=4"},"body":"This is already done refs/notes/commits (or any other notes ref) is a\nnormal commit and so any edits to the notes are thus tracked in the\nnormal way.\n\nTo see this add a note, then use:\n\n    gitk notes/commits.\n\nRegards,\n\njon.\n\nOn Sun, Feb 7, 2010 at 10:50 PM, Giuseppe Bilotta\n<giuseppe.bilotta@gmail.com> wrote:\n> Hello all,\n>\n> ok, this may sound a little odd especially with the 'notes vs\n> metadata' thread going on, but I was wondering: do we store _any_ kind\n> of metadata _about_ the notes themselves? If I'm reading the code\n> correctly, we have neither author nor date information about the notes\n> themselves, so we don't know who added them or when. Is it too late to\n> suggest that this kind of metadata be added to notes? Making them\n> full-blown commit-style objects is probalby overengineered and wrong\n> under many points of view (not to mention probably incompatible with\n> current storage), but maybe we can set up a convention that notes\n> SHOULD be in pseudo-mbox format? This would mean that when a note is\n> created, the template starts with a 'From ' line including the user's\n> name &  email and note creation date; when editing, the note is again\n> augmented with the new author name email and date. Of course the users\n> are then free do expunge the From lines if they don't want it (just\n> commenting it would be enough, of course). How does the idea sound?\n>\n> --\n> Giuseppe \"Oblomov\" Bilotta\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"133897","messageId":"201002072357.24021.johan@herland.net","threadId":"22558","inReplyTo":"cb7bb73a1002070350j750287abl43de4d936a47acef@mail.gmail.com","subject":"Re: notes metadata?","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2010-02-07T22:57:24Z","receivedAt":"2010-02-07T22:57:24Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Sunday 07 February 2010, Giuseppe Bilotta wrote:\n> Hello all,\n> \n> ok, this may sound a little odd especially with the 'notes vs\n> metadata' thread going on, but I was wondering: do we store _any_ kind\n> of metadata _about_ the notes themselves? If I'm reading the code\n> correctly, we have neither author nor date information about the notes\n> themselves, so we don't know who added them or when. Is it too late to\n> suggest that this kind of metadata be added to notes? Making them\n> full-blown commit-style objects is probalby overengineered and wrong\n> under many points of view (not to mention probably incompatible with\n> current storage), but maybe we can set up a convention that notes\n> SHOULD be in pseudo-mbox format? This would mean that when a note is\n> created, the template starts with a 'From ' line including the user's\n> name &  email and note creation date; when editing, the note is again\n> augmented with the new author name email and date. Of course the users\n> are then free do expunge the From lines if they don't want it (just\n> commenting it would be enough, of course). How does the idea sound?\n\nNAK\n\nNotes are stored in a notes tree that is changed by making commits on the \nnotes ref (see commit_notes() in builtin-notes.c in 'pu'). The commits on \nthe notes ref are regular commits with the usual commit metadata (author, \ndate, etc.), so if you're interested in who/when a given note was written, \nyou can simply point 'git (gui) blame' at the notes tree.\n\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"133918","messageId":"cb7bb73a1002080232u24d74997r1ec4c9a4068b7282@mail.gmail.com","threadId":"22558","inReplyTo":"201002072357.24021.johan@herland.net","subject":"Re: notes metadata?","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2010-02-08T10:32:08Z","receivedAt":"2010-02-08T10:32:08Z","isPatch":false,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Sun, Feb 7, 2010 at 11:57 PM, Johan Herland <johan@herland.net> wrote:\n> On Sunday 07 February 2010, Giuseppe Bilotta wrote:\n>> Hello all,\n>>\n>> ok, this may sound a little odd especially with the 'notes vs\n>> metadata' thread going on, but I was wondering: do we store _any_ kind\n>> of metadata _about_ the notes themselves? If I'm reading the code\n>> correctly, we have neither author nor date information about the notes\n>> themselves, so we don't know who added them or when. Is it too late to\n>> suggest that this kind of metadata be added to notes? Making them\n>> full-blown commit-style objects is probalby overengineered and wrong\n>> under many points of view (not to mention probably incompatible with\n>> current storage), but maybe we can set up a convention that notes\n>> SHOULD be in pseudo-mbox format? This would mean that when a note is\n>> created, the template starts with a 'From ' line including the user's\n>> name &  email and note creation date; when editing, the note is again\n>> augmented with the new author name email and date. Of course the users\n>> are then free do expunge the From lines if they don't want it (just\n>> commenting it would be enough, of course). How does the idea sound?\n>\n> NAK\n>\n> Notes are stored in a notes tree that is changed by making commits on the\n> notes ref (see commit_notes() in builtin-notes.c in 'pu'). The commits on\n> the notes ref are regular commits with the usual commit metadata (author,\n> date, etc.), so if you're interested in who/when a given note was written,\n> you can simply point 'git (gui) blame' at the notes tree.\n\nYup, I was totally overseeing the obvious thing about the notes\ncommit, and up until this morning I thought that settled the issue.\n\nHowever, this morning I read Junio's posts about the issue of merging notes\nhttp://permalink.gmane.org/gmane.comp.version-control.git/139252 and\nthought that this might be a possible solution.\n\nJunio's root issue is basically that you can only have one note per\ncommit per namespace, and that normally notes from different\ndevelopers grow from different root commits and are thus unmergeable.\n\nI see two possible solutions to this:\n * one is to allow more than one note per commit per namespace, which\nmoves a little towards the 'note as a tree' idea, but with severe\nrestrictions (the tree would be flat and each blob in it would be a\nnote)\n* the other is to keep the notes as single files, but give them a\nlittle bit of structure to make merging easier: my mbox-style idea\nwould of course only be an idea, but in general by keeping the notes\n'sectioned', merging could be reduced to concatenation most of the\ntimes. The mbox approach also has the benefit that you'd have more\ninformation about the single section, so that you could for example\nkeep them sorted etc.\n\nJust brainstorming here, so feel free to tear down this idea too 8-)\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"}]}