{"thread":{"id":"22954","subject":"Git Notes Usage","startedAt":"2010-03-08T19:52:47Z","lastAt":"2010-03-08T23:20:00Z","messageCount":3,"participants":["Scott Chacon","Michael J Gruber","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"136404","messageId":"d411cc4a1003081152j5b9f3028wa230b5e1d22a36ae@mail.gmail.com","threadId":"22954","inReplyTo":null,"subject":"Git Notes Usage","fromName":"Scott Chacon","fromEmail":"schacon@gmail.com","sentAt":"2010-03-08T19:52:47Z","receivedAt":"2010-03-08T19:52:47Z","isPatch":false,"sender":{"key":"schacon@gmail.com","avatar":"https://gravatar.com/avatar/9b13a8a078e1dcf8588c4eea9554445d51ebed6c41b51f56f4d96738130b05c6?d=mp&s=160"},"body":"I've been trying to write up the git-notes functionality a bit and I'm\na tad confused about the remote workflow.  To share them, is it only\ndo-able by pushing via the full refspec (ie: 'git push origin\nrefs/notes/*:refs/notes/*')?  Likewise to fetch them from a server?\nAlso, if two people write notes into the same namespace at the\nsame time, how does one merge them?  Is the only way to do so to\nactually checkout the notes branch into your working directory and\nmerge the notes trees?\n\nThanks,\nScott\n"},{"id":"136412","messageId":"4B95652E.6070802@drmicha.warpmail.net","threadId":"22954","inReplyTo":"d411cc4a1003081152j5b9f3028wa230b5e1d22a36ae@mail.gmail.com","subject":"Re: Git Notes Usage","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-03-08T20:59:26Z","receivedAt":"2010-03-08T20:59:26Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Scott Chacon venit, vidit, dixit 08.03.2010 20:52:\n> I've been trying to write up the git-notes functionality a bit and I'm\n> a tad confused about the remote workflow.  To share them, is it only\n> do-able by pushing via the full refspec (ie: 'git push origin\n> refs/notes/*:refs/notes/*')?  Likewise to fetch them from a server?\n\nYou can also write this into the config...\nOK, seriously: I think for \"typical usage\" one stores others' notes in a\ndifferent place anyways, e.g. I store Thomas' list-notes in\nrefs/remotes/trast/notes/ so that they don't interfer with my own notes.\n\nI don't think that teaching --notes to git push (a la --tags) with a\nstandard refspec would help in many cases.\n\n> Also, if two people write notes into the same namespace at the\n> same time, how does one merge them?  Is the only way to do so to\n> actually checkout the notes branch into your working directory and\n> merge the notes trees?\n\nI'd say every merge needs a working directory, so, yes.\n\nMichael\n"},{"id":"136437","messageId":"7vhboqjt9b.fsf@alter.siamese.dyndns.org","threadId":"22954","inReplyTo":"4B95652E.6070802@drmicha.warpmail.net","subject":"Re: Git Notes Usage","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-03-08T23:20:00Z","receivedAt":"2010-03-08T23:20:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n>> Also, if two people write notes into the same namespace at the\n>> same time, how does one merge them?  Is the only way to do so to\n>> actually checkout the notes branch into your working directory and\n>> merge the notes trees?\n>\n> I'd say every merge needs a working directory, so, yes.\n\nWhile that is true in the most general case, I do not necessarily agree\nthat people would use notes that way.\n\nMerging two notes trees would require a lot more than the ordinary merge\nmachinery offers (there is a tree rebalancing logic in notes tree\nmechanism, and notes specific merge that is yet to be written should take\nadvantage of it) and if one wants to do the merge manually, you would need\nto check them out in a working tree.\n\nThe \"notes copy\" feature (parked in 'pu') lets you deal with conflicts by\nallowing you to concatenate (or overwrite) while copying a note for commit\nY to another commit X and when X already has a note attached to it.  If\nyou think about it, it is merging an old note (that came from emptiness)\nwith a new note (that also came from emptiness) using an emptiness as\ntheir common ancestor, i.e. two-tree merge with \"union\" merge semantics\n(or \"ours\" if you say \"overwrite\", \"theirs\" if you say \"ignore\").\n\nI suspect that in practice people would want notes to be resolved more\nautomatically and inclusively (read: union merge) compared to how the\nnormal payload would be merged, without the need to have a checkout in the\nworking tree.\n"}]}