unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: William Casarin <jb55@jb55.com>
Cc: notmuch@notmuchmail.org
Subject: Re: Washing GitHub emails to include inline patch?
Date: Fri, 13 Oct 2017 01:24:13 -0400	[thread overview]
Message-ID: <87mv4vd3ia.fsf@kyleam.com> (raw)
In-Reply-To: <87zi8w17zd.fsf@jb55.com>

William Casarin <jb55@jb55.com> writes:

> This worked pretty well, I've modified it a bit to support a generic
> github repo location which is parsed from the subject,

Great, glad you were able to tweak that test function into something
that works well with your setup.

> and origin/master instead of master:

Yep, that's better.

>  (defun km/notmuch-visit-pr-in-magit (&optional dont-fetch)
> @@ -39,4 +41,4 @@
>      ;; passing a more explicit refspec to the fetch call.
>      (unless dont-fetch
>        (magit-call-git "fetch" "origin"))

Looking at what I wrote again, I'd change DONT-FETCH to FORCE-FETCH and
then do something like

    (when (or force-fetch
              (not (magit-ref-exists-p local-ref)))
      (magit-call-git "fetch" "origin"))

where local-ref is bound to "refs/pull/origin/<pr>".  That way, "git
fetch" is only called if the ref doesn't already exist locally or when a
prefix argument is given, which would be useful for forced updates.

> -    (magit-log (list (concat "master..refs/pull/origin/" pr)))))
> +    (magit-log (list (concat "origin/master..refs/pull/origin/" pr)))))

Anyway, it's nice to see that you've been able to modify this into
something that might be useful to you.

-- 
Kyle

  reply	other threads:[~2017-10-13  5:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22  1:49 Washing GitHub emails to include inline patch? Kyle Meyer
2017-09-22 14:17 ` Tomi Ollila
2017-09-22 14:57   ` Kyle Meyer
2017-09-22 21:38 ` William Casarin
2017-10-10 17:35 ` William Casarin
2017-10-10 19:54   ` Kyle Meyer
2017-10-11  1:45     ` William Casarin
2017-10-11  3:51       ` Kyle Meyer
2017-10-11  4:38         ` William Casarin
2017-10-12 19:28         ` William Casarin
2017-10-13  5:24           ` Kyle Meyer [this message]
2017-10-13  6:03             ` William Casarin
  -- strict thread matches above, loose matches on Subject: below --
2017-09-21 16:34 William Casarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv4vd3ia.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=jb55@jb55.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).