Bug 235393 - dev-util/git: 72git-gentoo.el does nothing for >=emacs-22.2
Bug#: 235393 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: emacs@gentoo.org Reported By: simons@cryp.to
Component: Ebuilds
URL: 
Summary: dev-util/git: 72git-gentoo.el does nothing for >=emacs-22.2
Keywords:  
Status Whiteboard: 
Opened: 2008-08-21 18:55 0000
Description:   Opened: 2008-08-21 18:55 0000
I'm wondering about the file
/usr/share/emacs/site-lisp/site-gentoo.d/72git-gentoo.el that's installed by 
dev-util/git: Why is the initialization code contained in a 

  (unless (fboundp 'vc-git-registered) ...)

bracket? I don't see how git can be registered as a VC backend at the time that
file is parsed. No matter what I do, I cannot make the default installation
support M-x git-status. Removing that unless-conditional remedies the problem.

Am I missing something? How is that thing supposed to work?

Reproducible: Always

Steps to Reproduce:
1. USE=emacs emerge git
2. emacs
3. M-x git-status

Doesn't work.

------- Comment #1 From Ulrich Müller 2008-08-21 20:13:47 0000 -------
This is on purpose, since VC in >=emacs-22.2 comes with its own Git backend
already. So in this case we disable the code that comes with dev-util/git, see
bug 194690.

------- Comment #2 From Ulrich Müller 2008-08-25 08:03:15 0000 -------
Resolving as invalid. Please reopen if you think that this is still an issue.

For clarification, I've put a comment in 72git-gentoo.el:
;; GNU Emacs >=22.2 already includes vc-git.el.
;; Enable the following only if Emacs has no GIT support.

------- Comment #3 From Peter Simons 2008-10-30 05:25:52 0000 -------
The git support shipped with Emacs does not provide 'git-status'; the mode
installed by git, however, does. So the elisp files from git should be
preferred. Am I missing something? 

------- Comment #4 From Ulrich Müller 2008-10-30 07:24:40 0000 -------
Created an attachment (id=170294) [details]
Proposed patch for git-1.6.0.3.ebuild

(In reply to comment #3)
> The git support shipped with Emacs does not provide 'git-status'; the mode
> installed by git, however, does. So the elisp files from git should be
> preferred.

As I wrote before, we cannot use vc-git.el with Emacs >= 22.2.

But you have a point, we could autoload git.el (i.e., git-status)
unconditionally and apply the version test only for vc-git.el. Patch for the
ebuild is attached, new site-init file will follow.

------- Comment #5 From Ulrich Müller 2008-10-30 07:29:27 0000 -------
Created an attachment (id=170296) [details]
files/50git-gentoo.el

New site-init file.

(I've changed its number from 72 to the canonical 50. There is no other package
required before git in the load sequence, and whenever I see a number like 72 I
ask myself what would be the reason for this.)

------- Comment #6 From Ulrich Müller 2008-11-15 13:22:57 0000 -------
robbat2, any objections if I commit this myself?

------- Comment #7 From Robin Johnson 2008-11-24 00:46:42 0000 -------
In 1.6.0.4-r1