{"thread":{"id":"38332","subject":"Distributed code review discussion","startedAt":"2015-01-10T18:05:35Z","lastAt":"2015-01-10T18:54:54Z","messageCount":3,"participants":["Matus Faro","Junio C Hamano","W. Trevor King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"254533","messageId":"CAH5CKOqSc2qLZwhCrafYkXMvLmRxKeA_7OO+WzM2FQwKS9F3cQ@mail.gmail.com","threadId":"38332","inReplyTo":null,"subject":"Distributed code review discussion","fromName":"Matus Faro","fromEmail":"matusfaro@gmail.com","sentAt":"2015-01-10T18:05:35Z","receivedAt":"2015-01-10T18:05:35Z","isPatch":false,"sender":{"key":"matusfaro@gmail.com","avatar":null},"body":"Are there any plans for supporting merge requests and code reviews\nnatively in git?\n\nWhat I mean is a distributed code review system where a merge request\nalong with review comments would be stored within the git repository\nand allowed to be pushed and pulled between repository clones. This\nwould allow users to retain the code review history without relying on\ncentralized or proprietary third party solutions.\n\nI am debating on creating a plugin for the current git suite starting\nwith a bash script as a proof of concept and eventually creating a GUI\nvia Tcl/Tk for best cross-platform support. The idea is to store the\ncode review metadata as empty commits within a branch. This is for a\nnumber of reasons:\n- Ensure backwards compatibility with all current git clients. Classic\ngit push, pull, merge commands will be able to move the code review\nmetadata around.\n- Easy migration on and off of the distributed code review system. No\nleftover metadata stored within the user's repository besides human\nreadable commits.\n- If desired, empty commits can be easily squashed after merge or\nsummarized into a single commit to retain history.\n- Commits can be created outside of the code review plugin.\n\nExample commits:\n\"## Open refs/heads/distributed-review -> refs/heads/master --\nDistributed code review feature\"\n\"## Comment 71a3f9 src/review.c:412 -- Did you even compile this?\"\n\"## Close 71a3f9 -- This feature is horrible, closing...\"\n\nQuestions:\n- Are you interested in adding this sort of functionality to git? I\nwould be very interested in contributing instead of working alone.\n- Am I crazy? Do you see an interest from the community in distributed\ncode reviews?\n- Any other criticism?\n\nThank you,\nMatus Faro\n"},{"id":"254537","messageId":"CAPc5daX2VnikiBOLOSbTuf7QtejV9VRDg-UJKjNQg_6DhUS_Yw@mail.gmail.com","threadId":"38332","inReplyTo":"CAH5CKOqSc2qLZwhCrafYkXMvLmRxKeA_7OO+WzM2FQwKS9F3cQ@mail.gmail.com","subject":"Re: Distributed code review discussion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-10T18:34:25Z","receivedAt":"2015-01-10T18:34:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"On Sat, Jan 10, 2015 at 10:05 AM, Matus Faro <matusfaro@gmail.com> wrote:\n> Are there any plans for supporting merge requests and code reviews\n> natively in git?\n>\n> What I mean is a distributed code review system where a merge request\n> along with review comments would be stored within the git repository\n> and allowed to be pushed and pulled between repository clones. ...\n\nI remember hearing that Gerrit is already going in that direction, except\nthat their plan do not include contaminating the project's real history with\nthe review metadata. You may want to study what they plan to do in order\nto make yours compatible, if you are planning to write a new one.\n"},{"id":"254538","messageId":"20150110185453.GL9044@odin.tremily.us","threadId":"38332","inReplyTo":"CAH5CKOqSc2qLZwhCrafYkXMvLmRxKeA_7OO+WzM2FQwKS9F3cQ@mail.gmail.com","subject":"Re: Distributed code review discussion","fromName":"W. Trevor King","fromEmail":"wking@tremily.us","sentAt":"2015-01-10T18:54:54Z","receivedAt":"2015-01-10T18:54:54Z","isPatch":false,"sender":{"key":"wking@tremily.us","avatar":"https://avatars.githubusercontent.com/u/209920?v=4"},"body":"On Sat, Jan 10, 2015 at 01:05:35PM -0500, Matus Faro wrote:\n> What I mean is a distributed code review system where a merge\n> request along with review comments would be stored within the git\n> repository and allowed to be pushed and pulled between repository\n> clones. This would allow users to retain the code review history\n> without relying on centralized or proprietary third party solutions.\n\nYou can do this today with pull-requests and code review happening in\nemail, since you just have to distribute the mail archives to have a\nrecord of pull-requests and code review discussions (e.g. notmuch\nposts an mbox of it's list archives [1]).  For better usability, you\nhave a few more options borrowing from the notmuch workflow:\n\n* Index messages in notmuch [2] (like notmuch does) and tag them so\n  you know what branches are waiting on review [3] or author feedback\n  [4].\n* Use nmbug [5] to collaborate on tagging and distribute tags to\n  interested parties.\n\nThings I've been thinking about doing “at some point”:\n\n* Use ssoma [6] or my ssoma-mda Python port [7] to store the list\n  archives in Git using this format [8].  I'd like to teach notmuch to\n  read messages directly from the ssoma archive, which would let you\n  replace the mbox archive with something that's easier to collaborate\n  on than an mbox archive (e.g. for removing duplicates or fixing\n  typos).  If all interested parties are using ssoma-style storage for\n  the archives, you don't have to worry about “oops, I didn't mean to\n  hit send” types of errors, since it's easy to patch the archive\n  itself.\n* Provide a web-UI for browsing the archive and manipulating tags, so\n  folks don't need to install Git / notmuch / ssoma to get involved in\n  patch review.  I'd still have them submit comments via email, but\n  you could have the web-app send email for them if you have\n  anti-email users ;).\n\nCheers,\nTrevor\n\n[1]: http://notmuchmail.org/archives/notmuch.mbox\n[2]: http://notmuchmail.org/\n[3]: http://nmbug.tethera.net/status/#Review\n[4]: http://nmbug.tethera.net/status/#Moreinfo\n[5]: http://notmuchmail.org/nmbug/\n[6]: http://ssoma.public-inbox.org/README\n[7]: http://git.tremily.us/?p=ssoma-mda.git\n[8]: http://ssoma.public-inbox.org/ssoma_repository.txt\n\n-- \nThis email may be signed or encrypted with GnuPG (http://www.gnupg.org).\nFor more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\n"}]}