# Git vc-git.el versus Emacs vc-git.el versus Gits git.el

4 messages from 2009-02-03 to 2009-02-03. Participants: Brent Goodrick, Alexandre Julliard, Junio C Hamano.
Thread: https://gitlist.dev/t/17519

## Brent Goodrick, 2009-02-03 03:31

Subject: Git vc-git.el versus Emacs vc-git.el versus Gits git.el
Message-ID: <18823.47791.359047.560149@hungover.brentg.com>
URL: https://gitlist.dev/e/18823.47791.359047.560149%40hungover.brentg.com

```

Hi,

I have some questions concerning the Emacs Git integration:

 1. What is the difference between git.el and vc-git.el in the
    git/contrib/emacs directory?

 2. There is a vc-git.el in the Emacs top-of-trunk sources, and
    another one in the git/contrib/emacs directory in the Git
    sources. Which one should I use?  If I should use the one in
    Emacs, then why is there one in the Git source tree?

Thanks,
Brent

```

## Alexandre Julliard, 2009-02-03 10:34

Subject: Re: Git vc-git.el versus Emacs vc-git.el versus Gits git.el
Message-ID: <87ab93yfjx.fsf@wine.dyndns.org>
URL: https://gitlist.dev/e/87ab93yfjx.fsf%40wine.dyndns.org
In-Reply-To: <18823.47791.359047.560149@hungover.brentg.com>

```
Brent Goodrick <bgoodr@gmail.com> writes:

> Hi,
>
> I have some questions concerning the Emacs Git integration:
>
>  1. What is the difference between git.el and vc-git.el in the
>     git/contrib/emacs directory?

vc-git.el is a backend for the Emacs VC mode, which supports the
standard C-x v commands. The advantage is that you can use the same
commands for all VCS.

git.el is a project-wide status manager equivalent to pcl-cvs, but
specialized for git. Its advantage is that by not trying to be generic
it can offer more git-specific functionality that isn't available with
VC mode.

They are not exclusive, you can use both at the same time, depending on
what operations you are doing.

>  2. There is a vc-git.el in the Emacs top-of-trunk sources, and
>     another one in the git/contrib/emacs directory in the Git
>     sources. Which one should I use?  If I should use the one in
>     Emacs, then why is there one in the Git source tree?

The most recent one is the one in the Emacs trunk, so you should use
this if possible. The one in the Git tree is an older version that's no
longer maintained, though it can still be useful if you are running an
old Emacs version.

-- 
Alexandre Julliard
julliard@winehq.org

```

## Brent Goodrick, 2009-02-03 15:53

Subject: Re: Git vc-git.el versus Emacs vc-git.el versus Gits git.el
Message-ID: <18824.26760.499534.315711@hungover.brentg.com>
URL: https://gitlist.dev/e/18824.26760.499534.315711%40hungover.brentg.com
In-Reply-To: <87ab93yfjx.fsf@wine.dyndns.org>

```

Alexandre Julliard writes:
 > Brent Goodrick <bgoodr@gmail.com> writes:
 > 
 > > Hi,
 > >
 > > I have some questions concerning the Emacs Git integration:
 > >
 > >  1. What is the difference between git.el and vc-git.el in the
 > >     git/contrib/emacs directory?
 > 
 > vc-git.el is a backend for the Emacs VC mode, which supports the
 > standard C-x v commands. The advantage is that you can use the same
 > commands for all VCS.
 > 
 > git.el is a project-wide status manager equivalent to pcl-cvs, but
 > specialized for git. Its advantage is that by not trying to be generic
 > it can offer more git-specific functionality that isn't available with
 > VC mode.
 > 
 > They are not exclusive, you can use both at the same time, depending on
 > what operations you are doing.

Sounds reasonable. I plan on using both since they are compatible with
each other.

 > 
 > >  2. There is a vc-git.el in the Emacs top-of-trunk sources, and
 > >     another one in the git/contrib/emacs directory in the Git
 > >     sources. Which one should I use?  If I should use the one in
 > >     Emacs, then why is there one in the Git source tree?
 > 
 > The most recent one is the one in the Emacs trunk, so you should use
 > this if possible. The one in the Git tree is an older version that's no
 > longer maintained, though it can still be useful if you are running an
 > old Emacs version.

Having the git.el and the vc-git.el file in the same git sources
directory, git/contrib/emacs, fouls up standard `require' loading
practice on Emacs 23 since Emacs 23 has vc-git.el in the load-path
already.  This is the way that I have hacked around it in my Emacs 23
setup, which also explains why:

	;; We can't use (add-to-list 'load-path git-emacs-lisp-dir) here because
	;; there is an older version of vc-git.el in that same directory, and we
	;; prefer the one that comes with Emacs 23:
	(load-file (expand-file-name "git.el" git-emacs-lisp-dir))

Since the vc-git.el is old, would it be feasible/desirable to rename
git/contrib/emacs/vc-git.el to git/contrib/emacs/old/vc-git.el so as
to allow older Emacs to continue to load the older version?

I would suppose that if/when git.el is moved into the Emacs sources,
then the same renaming operation would be done for git.el, too.

Also, I could not find any section in the Git manual for git.el.
Given that it is in the contrib directory, perhaps a separate manual
file would be appropriate?

Thanks for your help!
Brent

```

## Junio C Hamano, 2009-02-03 17:46

Subject: Re: Git vc-git.el versus Emacs vc-git.el versus Gits git.el
Message-ID: <7v63jrbehl.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v63jrbehl.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <87ab93yfjx.fsf@wine.dyndns.org>

```
Alexandre Julliard <julliard@winehq.org> writes:

>>  2. There is a vc-git.el in the Emacs top-of-trunk sources, and
>>     another one in the git/contrib/emacs directory in the Git
>>     sources. Which one should I use?  If I should use the one in
>>     Emacs, then why is there one in the Git source tree?
>
> The most recent one is the one in the Emacs trunk, so you should use
> this if possible. The one in the Git tree is an older version that's no
> longer maintained, though it can still be useful if you are running an
> old Emacs version.

A patch to add contrib/emacs/README to hold this info would be nice.

```
