From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 65D896DE0C67 for ; Tue, 10 Oct 2017 12:54:26 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.614 X-Spam-Level: X-Spam-Status: No, score=-0.614 tagged_above=-999 required=5 tests=[AWL=0.087, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rzfY2S8mlamq for ; Tue, 10 Oct 2017 12:54:24 -0700 (PDT) Received: from sasl.smtp.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by arlo.cworth.org (Postfix) with ESMTPS id 6A2126DE0B78 for ; Tue, 10 Oct 2017 12:54:24 -0700 (PDT) Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 2992C9F648; Tue, 10 Oct 2017 15:54:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=u/DRGX8rjv3MyySf1gpnH0gdL3o=; b=CsUmWr j2QOo0qkxIhAPUnAvBBuSLyR1SCsYJbjnjzf6uiJXDxLnwk0iwFPTkRqhf5YfcHR GgRxYt7zK8W+Jw0deZ8rcIlXGD3F7Xp5+6a99mN3KEDzofNnaZOpAdGFPOkoCHH/ uCdDfxYAplbbBnVsd3SSXuCZZm6K13y3YDEw8= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 21BDC9F646; Tue, 10 Oct 2017 15:54:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=ARgNfeor7fHB4Ii8tq8KYpvS0deiOIydMPi1MGoUzWo=; b=olpEcMRP3UPzjUVIAT3SI3cto8SVQ7I9kjEx3IREfXcV2mUZBhPjtAG9jjl65Q/I7DjUZy9Twc2s3rySYIS3id7b0SEn2nZTZmAkuAvRblKrFaPM4rV8LUo572WydnMsFVlfM1rr/e1nQRZ2tVqVftADP2dA2W2msz/D9Vw/6Iw= Received: from localhost (unknown [24.60.167.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id A880C9F644; Tue, 10 Oct 2017 15:54:21 -0400 (EDT) From: Kyle Meyer To: William Casarin Cc: notmuch@notmuchmail.org Subject: Re: Washing GitHub emails to include inline patch? In-Reply-To: <878tgi7vo3.fsf@jb55.com> References: <87d16jtsdj.fsf@kyleam.com> <878tgi7vo3.fsf@jb55.com> Date: Tue, 10 Oct 2017 15:54:20 -0400 Message-ID: <87o9pebwyb.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: CF2527D0-ADF4-11E7-8C59-575F0C78B957-24757444!pb-smtp2.pobox.com X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 19:54:26 -0000 William Casarin writes: > I was wondering if you had any insight into what I'm thinking next. I > would love to view these patches via the way magit handles hunks. I > wonder if there was a way to get magit-style hunk browsing when viewing > a patch file with a series of commits. > > Things like: > > * Jump to the next/previous hunk/commit in a patch series Diff mode has navigation commands to go to the next hunk/file, but not the next commit. > * Collapse hunks/commits with tab Hmm, yeah, I don't think Diff mode has commands for collapsing sections. And I haven't checked, but I'd guess that Diff mode isn't really recognizing the structure of the patch series; it's probably just considering the next commit's header/message as context lines. Magit doesn't have a mode for displaying a patch series. Creating such a mode shouldn't be too painful, at least if the command maps the patch series to a local repository. However, I personally haven't felt the need for such a command. I pretty frequently use the command I posted earlier in this thread to take a quick look at PRs, but, for anything aside from the simplest changes, I want to apply the commits locally to review/test. If I regularly review PRs for a GitHub repo, I have fetch = +refs/pull/*/head:refs/pull/origin/* in the GitHub remote's configuration section of ".git/config". (GitLab has an analogous merge request namespace.) Then, after fetching from the GitHub remote, I can view the PR in Magit like I would any other ref. > You get this for free with mailed patches + notmuch, but dealing with > large patch series from GitHub is a bit annoying as it's one big buffer > with no way to jump between commits. I share your preference for mailed patches, but using the process above, I don't find *viewing* GitHub PRs annoying. I do find *reviewing* GitHub PRs annoying and tedious compared to reviewing patches on a mailing list. At the moment, I typically do the review/commenting locally and at the end open a browser and add my inline comments. Jonas recently got a Kickstarter funded [1], and one of his goals is to support code review from within Magit [2]. Not sure how that will turn out, but it seems more promising than my current strategy of hoping everyone will start sharing my preference for mail-based collaboration :) [1] https://www.kickstarter.com/projects/1681258897/its-magit-the-magical-git-client [2] https://github.com/magit/magit/issues/2972 -- Kyle