Re: [PATCH v2] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-13 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason  writes:

> I sent a v3 a few days ago which addressed this, it's at
> 20180310184545.16950-1-ava...@gmail.com

Thanks, I did look at that version but did not act on it immediately
and then forgot about it.

Queued.


Re: [PATCH v2] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-13 Thread Ævar Arnfjörð Bjarmason

On Tue, Mar 13 2018, Junio C. Hamano jotted:

> Martin Ågren  writes:
>
>>> +Emacs's own support for Git got better than what was offered by these
>>> +modules, or was superseded by popular 3rd-party Git modes such as
>>> +Magit.
>>
>> This somehow reads like "Emacs's own support ... was superseded ...".
>> Maybe that's what you mean, but i'm not sure. Perhaps s/, was superseded
>> by/. There are also/.
>
> I think "There are also" is way better.  If we really want to sy
> superseded, perhaps "The features these modules offered were
> superseded by Emacs's own support in VC mode, and popular
> third-party Git modes e.g. Magit" is what we can say.

I sent a v3 a few days ago which addressed this, it's at
20180310184545.16950-1-ava...@gmail.com
(https://public-inbox.org/git/20180310184545.16950-1-ava...@gmail.com/)
but I see that I screwd up the In-Reply-To (I still don't have this
fully automated) so that wasn't part of this thread, sorry.

That changes this wording, among other fixes (noted in the tbdiff).


Re: [PATCH v2] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-13 Thread Junio C Hamano
Martin Ågren  writes:

>> +Emacs's own support for Git got better than what was offered by these
>> +modules, or was superseded by popular 3rd-party Git modes such as
>> +Magit.
>
> This somehow reads like "Emacs's own support ... was superseded ...".
> Maybe that's what you mean, but i'm not sure. Perhaps s/, was superseded
> by/. There are also/.

I think "There are also" is way better.  If we really want to sy
superseded, perhaps "The features these modules offered were
superseded by Emacs's own support in VC mode, and popular
third-party Git modes e.g. Magit" is what we can say.



Re: [PATCH v2] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-10 Thread Martin Ågren
On 10 March 2018 at 13:30, Ævar Arnfjörð Bjarmason  wrote:
> diff --git a/contrib/emacs/README b/contrib/emacs/README
> index 82368bdbff..5a63109458 100644
> --- a/contrib/emacs/README
> +++ b/contrib/emacs/README
> @@ -1,30 +1,24 @@
> -This directory contains various modules for Emacs support.
> +This directory used to contain various modules for Emacs support.
>
> -To make the modules available to Emacs, you should add this directory
> -to your load-path, and then require the modules you want. This can be
> -done by adding to your .emacs something like this:
> +These were added shortly after Git was first released, since then

s/, since/. Since/ ?

> +Emacs's own support for Git got better than what was offered by these
> +modules, or was superseded by popular 3rd-party Git modes such as
> +Magit.

This somehow reads like "Emacs's own support ... was superseded ...".
Maybe that's what you mean, but i'm not sure. Perhaps s/, was superseded
by/. There are also/.

>  * git.el:
>
> -  Status manager that displays the state of all the files of the
> -  project, and provides easy access to the most frequently used git
> -  commands. The user interface is as far as possible compatible with
> -  the pcl-cvs mode. It can be started with `M-x git-status'.
> +  Wrapper for "git status" that provided access to other git commands.
> +
> +  Modern alternatives to this are Magit, or the VC mode that ships
> +  with Emacs.

s/, or/ and/ ? My thinking: "A and B are modern alternatives", not "A or
B are modern alternatives.".

>  * git-blame.el:
>
> -  Emacs implementation of incremental git-blame.  When you turn it on
> -  while viewing a file, the editor buffer will be updated by setting
> -  the background of individual lines to a color that reflects which
> -  commit it comes from.  And when you move around the buffer, a
> -  one-line summary will be shown in the echo area.
> +  A wrapper for "git blame" written before Emacs's own vc-annotate
> +  mode learned to invoke git-blame, which can be done via C-x v g.

Thanks for giving constructive hints. :-)

Martin


[PATCH v2] git{,-blame}.el: remove old bitrotting Emacs code

2018-03-10 Thread Ævar Arnfjörð Bjarmason
The git-blame.el mode has been superseded by Emacs's own
vc-annotate (invoked by C-x v g). Users of the git.el mode are now
much better off using either Magit or the Git backend for Emacs's own
VC mode.

These modes were added over 10 years ago when Emacs's own Git support
was much less mature, and there weren't other mature modes in the wild
or shipped with Emacs itself.

These days these modes have very few if users, and users of git aren't
well served by us shipping these (some OS's install them alongside git
by default, which is confusing and leads users astray).

So let's remove these per Alexandre Julliard's message to the
ML[1]. If someone still wants these for some reason they're better
served by hosting these elsewhere (e.g. on ELPA), instead of us
distributing them with git.

1. "Re: [PATCH] git.el: handle default excludesfile
   properly" (87muzlwhb0@winehq.org) --
   https://public-inbox.org/git/87muzlwhb0@winehq.org/

Signed-off-by: Ævar Arnfjörð Bjarmason 
---

On Thu, Mar 08 2018, Junio C. Hamano jotted:

> I agree with the overall direction.  The only difference between
> this and what I had in mind was if we want to leave README that says
> what you said in the log message.  That way, those who just got a
> new version of tarball and then wonder what happened to these
> scripts would save one trip to the Internet.

Here's a version where I amend the contrib/emacs/README to say that we
used to have some code here, but no longer do, with a brief overview
of the dead code and replacements for its functionality. Hopefully
that's more informative than just copy/pasting what I had in the
commit message.

 contrib/emacs/.gitignore   |1 -
 contrib/emacs/Makefile |   21 -
 contrib/emacs/README   |   32 +-
 contrib/emacs/git-blame.el |  483 -
 contrib/emacs/git.el   | 1704 
 5 files changed, 13 insertions(+), 2228 deletions(-)
 delete mode 100644 contrib/emacs/.gitignore
 delete mode 100644 contrib/emacs/Makefile
 delete mode 100644 contrib/emacs/git-blame.el
 delete mode 100644 contrib/emacs/git.el

diff --git a/contrib/emacs/.gitignore b/contrib/emacs/.gitignore
deleted file mode 100644
index c531d9867f..00
--- a/contrib/emacs/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.elc
diff --git a/contrib/emacs/Makefile b/contrib/emacs/Makefile
deleted file mode 100644
index 24d9312941..00
--- a/contrib/emacs/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-## Build and install stuff
-
-EMACS = emacs
-
-ELC = git.elc git-blame.elc
-INSTALL ?= install
-INSTALL_ELC = $(INSTALL) -m 644
-prefix ?= $(HOME)
-emacsdir = $(prefix)/share/emacs/site-lisp
-RM ?= rm -f
-
-all: $(ELC)
-
-install: all
-   $(INSTALL) -d $(DESTDIR)$(emacsdir)
-   $(INSTALL_ELC) $(ELC:.elc=.el) $(ELC) $(DESTDIR)$(emacsdir)
-
-%.elc: %.el
-   $(EMACS) -batch -f batch-byte-compile $<
-
-clean:; $(RM) $(ELC)
diff --git a/contrib/emacs/README b/contrib/emacs/README
index 82368bdbff..5a63109458 100644
--- a/contrib/emacs/README
+++ b/contrib/emacs/README
@@ -1,30 +1,24 @@
-This directory contains various modules for Emacs support.
+This directory used to contain various modules for Emacs support.
 
-To make the modules available to Emacs, you should add this directory
-to your load-path, and then require the modules you want. This can be
-done by adding to your .emacs something like this:
+These were added shortly after Git was first released, since then
+Emacs's own support for Git got better than what was offered by these
+modules, or was superseded by popular 3rd-party Git modes such as
+Magit.
 
-  (add-to-list 'load-path ".../git/contrib/emacs")
-  (require 'git)
-  (require 'git-blame)
-
-
-The following modules are available:
+The following modules were available, and can be dug up from the Git
+history:
 
 * git.el:
 
-  Status manager that displays the state of all the files of the
-  project, and provides easy access to the most frequently used git
-  commands. The user interface is as far as possible compatible with
-  the pcl-cvs mode. It can be started with `M-x git-status'.
+  Wrapper for "git status" that provided access to other git commands.
+
+  Modern alternatives to this are Magit, or the VC mode that ships
+  with Emacs.
 
 * git-blame.el:
 
-  Emacs implementation of incremental git-blame.  When you turn it on
-  while viewing a file, the editor buffer will be updated by setting
-  the background of individual lines to a color that reflects which
-  commit it comes from.  And when you move around the buffer, a
-  one-line summary will be shown in the echo area.
+  A wrapper for "git blame" written before Emacs's own vc-annotate
+  mode learned to invoke git-blame, which can be done via C-x v g.
 
 * vc-git.el:
 
diff --git a/contrib/emacs/git-blame.el b/contrib/emacs/git-blame.el
deleted file mode 100644
index 510e0f7103..00
--- a/contrib/emacs/git-blame.el
+++ /dev/null
@@ -1,483 +0,0 @@
-;;;