emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: git history tracking across renames (and emacs support), Re: git his


From: Jonas Bernoulli
Subject: Re: git history tracking across renames (and emacs support), Re: git history tracking across renames (and emacs support), Re: git history tracking across renames (and emacs support), Re: git history tracking across renames (and emacs support)
Date: Fri, 13 Jul 2018 15:13:41 -0500
User-agent: mu4e 1.1.0; emacs 26.1.50

Noam Postavsky <address@hidden> writes:

> On 11 July 2018 at 18:50, Richard Stallman <address@hidden> wrote:
>
>> Changing Magit cannot be a real solution unless/until we can have Magit
>> included in Emacs.
>
> Magit's maintainer is generally in favour of improving add-log.el so
> that both Magit and Emacs vc modes could use it.
>
> https://github.com/magit/magit/issues/2931
> Which also references Emacs Bug#16301
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16301

For people not following links, this is the most important point I am
making there:

The functionality should be split like so:

1. Generate a list of all changed symbols.
2. Format the list according to some preference.
3. Insert the formatted list somewhere.

Currently this is kinda squashed into a single task implemented in
`add-change-log-entry' for the most part and the current approach to
adding multiple entries (`diff-add-change-log-entries-other-window')
is implemented by calling that function multiple times.

`add-log-current-defun' implements part of (1), returning DEFUN,
but I think it should be extended to return (DEFUN FILE) at least.

And to complete (1) we would also need `add-log-defuns', returning
((FILE (DEFUN LINE)...)...).  Both of these functions should operate
on an (actual) diff, I think.

---

I haven't read all of the current discussion but got the impression that
a lot of it revolved around ChangeLog vs. commit message.  I think we
can easily have both, but only if we split the functionality as
suggested above.  Whether *Emacs* should ChangeLog files is a different
discussion (which I don't want to take part in), and it really does not
matter; some projects (currently including Emacs) use ChangeLog files,
while other (possibly including Emacs in the future) put the list of
modified symbols into the commit message only.  And regardless of where
the information is put, not every project uses the same format.

As I see it, the hard part -- from a technical perspective -- is to
reliably collect the list of modified "defuns" for as many languages as
possible (1).  Currently this is done using `add-log-current-defun', but
there are probably more reliable and universal, yet customizable,
implementations to be found elsewhere in Emacs.

>From a non-technical perspective the hard part is agreeing on what the
one and only correct way of recording this information is, which I think
we never be able to agree on.  We (everyone using version control) also
don't have to.  So lets keep those things separate.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]