unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Antoine Kalmbach <ane@iki.fi>
Cc: emacs-devel@gnu.org,  Philip Kaluderdic <philipk@posteo.net>
Subject: Re: Supporting git-send-email/hg email in VC
Date: Wed, 24 Aug 2022 13:06:29 -0400	[thread overview]
Message-ID: <jwv5yihpogj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <848rndq2i7.fsf@iki.fi> (Antoine Kalmbach's message of "Wed, 24 Aug 2022 14:56:00 +0300")

Antoine Kalmbach [2022-08-24 14:56:00] wrote:
> Would it make sense for Emacs' VC to support emailing patches from
> within Emacs?

Yes!

> The right thing would be in vc-dir-mode to prompt for a ref (branch, -1,
> HEAD^, etc),

I think in the general case it needs to revisions to delimit the
sequence of patches.  And since it's VC it'd need to take into account
the various ways backends can specify such a pair of revisions, but the
simplest option is really to receive the two revisions separately.

> in vc-log-mode it would be to compose a set of patches from the marked
> commit(s), or prompt like in vc-dir-mode for a ref to send a patch
> from a user-specified ref.

It might also make sense to allow it from a diff-mode buffer
(in which case VC would not be involved).

>> Warning! Some people think that they can get away with sending patches
>> through some means other than git send-email, but you can't. Your
>> patches will be broken and a nuisance to the maintainers whose inbox
>> they land in. Follow the golden rule: just use git send-email.
> But I find that if and only if you use git-format-patch, the end result
> is pretty much the same.

I'm not sure what problems they're thinking of, so maybe the "pretty
much" is a problem.

> If people think this would be a useful feature, I can open a bug report
> to track this and start working on it. The proposed reference
> implementation for Git would be to (1) ask the user for a ref (2) call
> git format-patch with that (3) compose a new message in Emacs, and set
> the body of the message to be the output of git-format-patch (OR attach
> the file) and (4) let the MUA take it from there.

Sounds good to me.


        Stefan




  parent reply	other threads:[~2022-08-24 17:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 11:56 Supporting git-send-email/hg email in VC Antoine Kalmbach
2022-08-24 14:43 ` Akib Azmain Turja
2022-08-24 15:11 ` Philip Kaludercic
2022-08-24 17:06 ` Stefan Monnier [this message]
2022-08-24 17:44 ` Juri Linkov
2022-08-24 21:31 ` Sam James
2022-08-25  8:36   ` Antoine Kalmbach
2022-08-25 14:47     ` Sean Whitton
2022-08-25 15:52       ` Philip Kaludercic
2022-08-25 22:04         ` Sean Whitton
2022-08-25 17:34     ` Stefan Monnier
2022-08-25 18:04       ` Philip Kaludercic
2022-08-26  7:14         ` Antoine Kalmbach
2022-08-26  7:15       ` Antoine Kalmbach
2022-08-26  3:35 ` Richard Stallman
2022-08-26  7:12   ` Antoine Kalmbach

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv5yihpogj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=ane@iki.fi \
    --cc=emacs-devel@gnu.org \
    --cc=philipk@posteo.net \
    /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://git.savannah.gnu.org/cgit/emacs.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).