[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Supporting git-send-email/hg email in VC
From: |
Antoine Kalmbach |
Subject: |
Re: Supporting git-send-email/hg email in VC |
Date: |
Fri, 26 Aug 2022 10:12:40 +0300 |
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
Re: Supporting git-send-email/hg email in VC, Richard Stallman, 2022/08/25
- Re: Supporting git-send-email/hg email in VC,
Antoine Kalmbach <=