all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Supporting git-send-email/hg email in VC
@ 2022-08-24 11:56 Antoine Kalmbach
  2022-08-24 14:43 ` Akib Azmain Turja
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Antoine Kalmbach @ 2022-08-24 11:56 UTC (permalink / raw)
  To: emacs-devel; +Cc: Philip Kaluderdic


Would it make sense for Emacs' VC to support emailing patches from
within Emacs? It kind of doesn't make sense that I can do mostly
everything in VC... but I have to jump to the command line (shell) to
use git-send-email.

I was thinking there could be a command called 'vc-mail-commit' which
would in vc-dir-mode or vc-log-mode do the right thing and call git
format-patch and then compose a mail with the contents of the patch (or
the patch attached, depending on customization).

The right thing would be in vc-dir-mode to prompt for a ref (branch, -1,
HEAD^, etc), 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.

Does such a feature make sense? I know sites like git-send-email.io[1]
say things like:

> 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. To that end, I think if Emacs managed to
integrate with the different DVCS' email-based workflows, it would be
a great usability improvement.

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.

Alternatively, it would be possible to use a combination of with-editor
+ git-send-email, but only if we should need ot abide by the "rule",
because to me there aren't many nuances beyond using the format
specified by git-format-patch with your own MUA vs. using
git-send-email. Or do I not know enough about the latter to not see the
missing pieces?

[1] https://git-send-email.io/#step-3

-- 
Antoine Kalmbach



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  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
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Akib Azmain Turja @ 2022-08-24 14:43 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: emacs-devel, Philip Kaluderdic

[-- Attachment #1: Type: text/plain, Size: 2564 bytes --]

Antoine Kalmbach <ane@iki.fi> writes:

> Would it make sense for Emacs' VC to support emailing patches from
> within Emacs? It kind of doesn't make sense that I can do mostly
> everything in VC... but I have to jump to the command line (shell) to
> use git-send-email.
>
> I was thinking there could be a command called 'vc-mail-commit' which
> would in vc-dir-mode or vc-log-mode do the right thing and call git
> format-patch and then compose a mail with the contents of the patch (or
> the patch attached, depending on customization).
>
> The right thing would be in vc-dir-mode to prompt for a ref (branch, -1,
> HEAD^, etc), 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.
>
> Does such a feature make sense? I know sites like git-send-email.io[1]
> say things like:
>
>> 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. To that end, I think if Emacs managed to
> integrate with the different DVCS' email-based workflows, it would be
> a great usability improvement.
>
> 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.
>
> Alternatively, it would be possible to use a combination of with-editor
> + git-send-email, but only if we should need ot abide by the "rule",
> because to me there aren't many nuances beyond using the format
> specified by git-format-patch with your own MUA vs. using
> git-send-email. Or do I not know enough about the latter to not see the
> missing pieces?
>
> [1] https://git-send-email.io/#step-3

I want this feature.  Even better if I can integrate this with Gnus.

-- 
Akib Azmain Turja

Find me on Mastodon at @akib@hostux.social.

This message is signed by me with my GnuPG key.  Its fingerprint is:

    7001 8CE5 819F 17A3 BBA6  66AF E74F 0EFA 922A E7F5

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Philip Kaludercic @ 2022-08-24 15:11 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: emacs-devel

Antoine Kalmbach <ane@iki.fi> writes:

> Would it make sense for Emacs' VC to support emailing patches from
> within Emacs? It kind of doesn't make sense that I can do mostly
> everything in VC... but I have to jump to the command line (shell) to
> use git-send-email.
>
> I was thinking there could be a command called 'vc-mail-commit' which
> would in vc-dir-mode or vc-log-mode do the right thing and call git
> format-patch and then compose a mail with the contents of the patch (or
> the patch attached, depending on customization).

If we are only composing a message, should we perhaps then use a name
like `vc-prepare-patch'?

Also, what do we do when someone wants to send multiple patches at once?
Will n message buffers pop up, or should they all be sent out
automatically after an introductory message (that would be displayed in
a separate buffer) has been sent?

> The right thing would be in vc-dir-mode to prompt for a ref (branch, -1,
> HEAD^, etc), 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.

This sounds like a good plan.  I had also been considering something
like this, but instead of using 'format-patch', I attempted to
generalise git send-email directly.  It appears to me that your approach
is preferable, insofar the result is actually "git am"-able.

> Does such a feature make sense? I know sites like git-send-email.io[1]
> say things like:
>
>> 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. To that end, I think if Emacs managed to
> integrate with the different DVCS' email-based workflows, it would be
> a great usability improvement.

I assume you are talking about an inline attachment, right?  Have you
tried sending yourself a message like that, and then filtering the
message body through git am?

> 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.

I certainly agree that this would be interesting, and I think it would
find explicit use in the feature/package+vc branch, by making it easier
to contribute changes upstream.

> Alternatively, it would be possible to use a combination of with-editor
> + git-send-email, but only if we should need ot abide by the "rule",
> because to me there aren't many nuances beyond using the format
> specified by git-format-patch with your own MUA vs. using
> git-send-email. Or do I not know enough about the latter to not see the
> missing pieces?

Unless with-editor would be added to the core, I think that we should
prefer the first approach to this one.

> [1] https://git-send-email.io/#step-3



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  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
  2022-08-24 17:44 ` Juri Linkov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 16+ messages in thread
From: Stefan Monnier @ 2022-08-24 17:06 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: emacs-devel, Philip Kaluderdic

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




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-24 11:56 Supporting git-send-email/hg email in VC Antoine Kalmbach
                   ` (2 preceding siblings ...)
  2022-08-24 17:06 ` Stefan Monnier
@ 2022-08-24 17:44 ` Juri Linkov
  2022-08-24 21:31 ` Sam James
  2022-08-26  3:35 ` Richard Stallman
  5 siblings, 0 replies; 16+ messages in thread
From: Juri Linkov @ 2022-08-24 17:44 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: emacs-devel, Philip Kaluderdic

> 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.

The existing command `submit-emacs-patch' might be helpful as a starting point
where you could replace reading of a patch file name with reading of
a set of revisions.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-24 11:56 Supporting git-send-email/hg email in VC Antoine Kalmbach
                   ` (3 preceding siblings ...)
  2022-08-24 17:44 ` Juri Linkov
@ 2022-08-24 21:31 ` Sam James
  2022-08-25  8:36   ` Antoine Kalmbach
  2022-08-26  3:35 ` Richard Stallman
  5 siblings, 1 reply; 16+ messages in thread
From: Sam James @ 2022-08-24 21:31 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: emacs-devel, Philip Kaluderdic

[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]



> On 24 Aug 2022, at 12:56, Antoine Kalmbach <ane@iki.fi> wrote:
> 
> 
> Would it make sense for Emacs' VC to support emailing patches from
> within Emacs? It kind of doesn't make sense that I can do mostly
> everything in VC... but I have to jump to the command line (shell) to
> use git-send-email.
> 
> [snip]
> 
> 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.

This definitely sounds invaluable to me. Thank you.

> 
> Alternatively, it would be possible to use a combination of with-editor
> + git-send-email, but only if we should need ot abide by the "rule",
> because to me there aren't many nuances beyond using the format
> specified by git-format-patch with your own MUA vs. using
> git-send-email. Or do I not know enough about the latter to not see the
> missing pieces?

That would work for me too, might be worth asking a git expert though.

Often, people are told to defer to git send-email because it definitely
does Things Right, but I haven't looked into the things it takes
care to do correctly. It might be easy for Emacs to do those.

> 
> [1] https://git-send-email.io/#step-3
> 

Best,
sam


> --
> Antoine Kalmbach
> 


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-24 21:31 ` Sam James
@ 2022-08-25  8:36   ` Antoine Kalmbach
  2022-08-25 14:47     ` Sean Whitton
  2022-08-25 17:34     ` Stefan Monnier
  0 siblings, 2 replies; 16+ messages in thread
From: Antoine Kalmbach @ 2022-08-25  8:36 UTC (permalink / raw)
  To: Sam James; +Cc: emacs-devel, Philip Kaluderdic, Stefan Monnier, Juri Linkov


It seems I wrote a bunch of replies off-list. Oops. Anyway, a summary of
what I think are the conclusions.

First, by relying only on git-format-patch to produce the emailsin the
Git backend we should not be omitting any nuance that git-send-email
has. Thus if we take the .patch file(s) directly and then open those in
the MUA of the user, we won't do anything drastically different from
git-email. The patches will by default be inline, though I suppose users
could customize these to become attachments, but these won't obviously
work with `git am`.

Sam James <sam@gentoo.org> writes:

> Often, people are told to defer to git send-email because it definitely
> does Things Right, but I haven't looked into the things it takes
> care to do correctly. It might be easy for Emacs to do those.

I will keep digging into this until I can be relatively confident about
the differences.  Looking at the source code and manuals it seems to me
that git-format-patch is doing the heavy lifting and git-send-email is
just a MUA on top of that.  I mean, git-send-email accepts .patch files
by git-format-patch as an argument, so it really appears just to be a
MUA.

But I need to be absolutely sure before proceeding.
-- 
Antoine Kalmbach



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-25  8:36   ` Antoine Kalmbach
@ 2022-08-25 14:47     ` Sean Whitton
  2022-08-25 15:52       ` Philip Kaludercic
  2022-08-25 17:34     ` Stefan Monnier
  1 sibling, 1 reply; 16+ messages in thread
From: Sean Whitton @ 2022-08-25 14:47 UTC (permalink / raw)
  To: Antoine Kalmbach
  Cc: Sam James, emacs-devel, Philip Kaluderdic, Stefan Monnier,
	Juri Linkov

Hello,

On Thu 25 Aug 2022 at 11:36AM +03, Antoine Kalmbach wrote:

> The patches will by default be inline, though I suppose users
> could customize these to become attachments, but these won't obviously
> work with `git am`.

By "customise" you mean manually add < #part > tags to turn them into
attachments?  That'll often be wanted, e.g. for submitting to Emacs.

-- 
Sean Whitton



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-25 14:47     ` Sean Whitton
@ 2022-08-25 15:52       ` Philip Kaludercic
  2022-08-25 22:04         ` Sean Whitton
  0 siblings, 1 reply; 16+ messages in thread
From: Philip Kaludercic @ 2022-08-25 15:52 UTC (permalink / raw)
  To: Sean Whitton
  Cc: Antoine Kalmbach, Sam James, emacs-devel, Stefan Monnier,
	Juri Linkov

Sean Whitton <spwhitton@spwhitton.name> writes:

>
> Hello,
>
> On Thu 25 Aug 2022 at 11:36AM +03, Antoine Kalmbach wrote:
>
>> The patches will by default be inline, though I suppose users
>> could customize these to become attachments, but these won't obviously
>> work with `git am`.
>
> By "customise" you mean manually add < #part > tags to turn them into
> attachments?  That'll often be wanted, e.g. for submitting to Emacs.

AFAIU "customise" is supposed to mean that a variable (preferably one
that is dir-local safe) can specify if patches are prepared in a git-am
style or attached.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-25  8:36   ` Antoine Kalmbach
  2022-08-25 14:47     ` Sean Whitton
@ 2022-08-25 17:34     ` Stefan Monnier
  2022-08-25 18:04       ` Philip Kaludercic
  2022-08-26  7:15       ` Antoine Kalmbach
  1 sibling, 2 replies; 16+ messages in thread
From: Stefan Monnier @ 2022-08-25 17:34 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: Sam James, emacs-devel, Philip Kaluderdic, Juri Linkov

> git-email. The patches will by default be inline, though I suppose users
> could customize these to become attachments, but these won't obviously
> work with `git am`.

Attachments should work just fine with `git am`, assuming you pass the
attachment to `git am` and not the whole message, of course.


        Stefan




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  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
  1 sibling, 1 reply; 16+ messages in thread
From: Philip Kaludercic @ 2022-08-25 18:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Antoine Kalmbach, Sam James, emacs-devel, Juri Linkov

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>
>> git-email. The patches will by default be inline, though I suppose users
>> could customize these to become attachments, but these won't obviously
>> work with `git am`.
>
> Attachments should work just fine with `git am`, assuming you pass the
> attachment to `git am` and not the whole message, of course.

But most mailing list based projects (besides Emacs and probably a few
other GNU projects) would reject patches sent in that way on formal
grounds.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-25 15:52       ` Philip Kaludercic
@ 2022-08-25 22:04         ` Sean Whitton
  0 siblings, 0 replies; 16+ messages in thread
From: Sean Whitton @ 2022-08-25 22:04 UTC (permalink / raw)
  To: Philip Kaludercic, Antoine Kalmbach, Sam James, emacs-devel,
	Stefan Monnier, Juri Linkov

Hello,

On Thu 25 Aug 2022 at 03:52PM GMT, Philip Kaludercic wrote:

>
> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>>
>> Hello,
>>
>> On Thu 25 Aug 2022 at 11:36AM +03, Antoine Kalmbach wrote:
>>
>>> The patches will by default be inline, though I suppose users
>>> could customize these to become attachments, but these won't obviously
>>> work with `git am`.
>>
>> By "customise" you mean manually add < #part > tags to turn them into
>> attachments?  That'll often be wanted, e.g. for submitting to Emacs.
>
> AFAIU "customise" is supposed to mean that a variable (preferably one
> that is dir-local safe) can specify if patches are prepared in a git-am
> style or attached.

Ah, that makes more sense, thank you.

-- 
Sean Whitton



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-24 11:56 Supporting git-send-email/hg email in VC Antoine Kalmbach
                   ` (4 preceding siblings ...)
  2022-08-24 21:31 ` Sam James
@ 2022-08-26  3:35 ` Richard Stallman
  2022-08-26  7:12   ` Antoine Kalmbach
  5 siblings, 1 reply; 16+ messages in thread
From: Richard Stallman @ 2022-08-26  3:35 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: emacs-devel, philipk

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Would it make sense for Emacs' VC to support emailing patches from
  > within Emacs? It kind of doesn't make sense that I can do mostly
  > everything in VC... but I have to jump to the command line (shell) to
  > use git-send-email.

You can already send mail inside Emacs.  It has had a feature
to edit and send messages since 1985 or so.

VC is a generic interface to version control systems.  The idea is to
make each command handles whichever version control system the files
are using.

If you'd like to implement the feature of "collect the differences
from some previous version and email them," please do not implement
it such that it is limited to one particular version control system,
or only to version control systems that have some special support.

Please implement a default method that works for all version control
systems.  The default method cannot use either git-send-email or
git-format-patch, because they (I presume) work only with git.  It
should make use of vc-diff-internal to generate the patch.

Having special code to handle the git case is ok, and it can use
git-format-patch if that works -- provided the default method makes
the feature work for other version control systems.

Use the command `compose-mail' go start setting up the email.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-26  3:35 ` Richard Stallman
@ 2022-08-26  7:12   ` Antoine Kalmbach
  0 siblings, 0 replies; 16+ messages in thread
From: Antoine Kalmbach @ 2022-08-26  7:12 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel, philipk

Richard Stallman <rms@gnu.org> writes:

> You can already send mail inside Emacs.  It has had a feature
> to edit and send messages since 1985 or so.
>
> VC is a generic interface to version control systems.  The idea is to
> make each command handles whichever version control system the files
> are using.
>

Absolutely. The whole point of this exercise is to leverage Emacs'
ability to compose mail together with VC. Most version control systems
support email based workflows, at least the ones I'm familiar with.

> If you'd like to implement the feature of "collect the differences
> from some previous version and email them," please do not implement
> it such that it is limited to one particular version control system,
> or only to version control systems that have some special support.
>
> Please implement a default method that works for all version control
> systems.  The default method cannot use either git-send-email or
> git-format-patch, because they (I presume) work only with git.  It
> should make use of vc-diff-internal to generate the patch.
>
> Having special code to handle the git case is ok, and it can use
> git-format-patch if that works -- provided the default method makes
> the feature work for other version control systems.
>

The idea is to provide a generic implementation for all version control
systems which would simply compose a new message and insert a suitable
diff into it, probably using `vc-diff-internal` or something like it.

Then some version control systems (like Git and Mercurial)
will have a different method, since the standard way of working with Git
and email is to send patches in a mbox-like format, where the patch is
inline, and then users can feed those mbox entries to `git am` (which is
short for "apply mbox").  This is different from `git apply`, which
applies a diff directly.

Such behavior for Git could be user customizable, e.g., to suit the
Emacs workflow, users can choose that VC patches be sent as
attachments.  We would default to the patches be directly in the
messages, since this is the standard Git approach.  Emacs developers can
either customize this or use `M-x submit-emacs-patch`.

So, in summary, there would be one default implementation that would
work on any version control system VC supports, and some version control
systems will have dedicated support. 

-- 
Antoine Kalmbach



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-25 18:04       ` Philip Kaludercic
@ 2022-08-26  7:14         ` Antoine Kalmbach
  0 siblings, 0 replies; 16+ messages in thread
From: Antoine Kalmbach @ 2022-08-26  7:14 UTC (permalink / raw)
  To: Philip Kaludercic, Stefan Monnier; +Cc: Sam James, emacs-devel, Juri Linkov

Philip Kaludercic <philipk@posteo.net> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> Attachments should work just fine with `git am`, assuming you pass the
>> attachment to `git am` and not the whole message, of course.
>
> But most mailing list based projects (besides Emacs and probably a few
> other GNU projects) would reject patches sent in that way on formal
> grounds.

Yes.  I think the default should be "inline" (not inline attachments),
like the mbox style Git advocates by default.  Then we can have a
customization that would just attach the .patch files directly.

-- 
Antoine Kalmbach



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Supporting git-send-email/hg email in VC
  2022-08-25 17:34     ` Stefan Monnier
  2022-08-25 18:04       ` Philip Kaludercic
@ 2022-08-26  7:15       ` Antoine Kalmbach
  1 sibling, 0 replies; 16+ messages in thread
From: Antoine Kalmbach @ 2022-08-26  7:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Sam James, emacs-devel, Philip Kaluderdic, Juri Linkov


Opened bug#57400 to track this.

-- 
Antoine Kalmbach



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-08-26  7:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.