# Git CVS Import Questions

2 messages from 2010-07-29 to 2010-07-30. Participants: Samir Faci, Jonathan Nieder.
Thread: https://gitlist.dev/t/24572

## Samir Faci, 2010-07-29 14:17

Subject: Git CVS Import Questions
Message-ID: <AANLkTin_d_wKxyJDMbjz4vFacr6GNYzE_aUGi2vbXW3V@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTin_d_wKxyJDMbjz4vFacr6GNYzE_aUGi2vbXW3V%40mail.gmail.com

```
I have a question about git cvs's import.

I have the following setup in ~/.bashrc:

export CVS_RSH=ssh
export CVSROOT=cvs:/cvs
export CVS_RSH CVSROOT

and I can do a cvs import using git by doing something along these lines:

mkdir bar; git cvsimport -v Foo/Bar   which checks out the history of
module Bar into the current directory (in this case bar)

now... if I do this again in another directory

mkdir bar2; git cvsimport -v Foo/Bar  which repeats the same process
the hashes don't match up.

case in point:
git log --oneline | head -n 1
2fa5b70 ChangeLog:     * Fixing build file syntax error.
git log --oneline | head -n 1
ccef115 ChangeLog:     * Fixing build file syntax error.


Now, correct me if I'm wrong.. but I thought the hashes were generated
based on the content of the diff.  So shouldn't two cvs checkouts
containing the same data
have the same hashes?   ie.  If a git commit is generated based on a
particular diff, then the hash should always be the same, should it
not?

Am I missing something?  I'm just trying to understand the behavior...
-- 
--
Samir Faci
*insert title*
fortune | cowsay -f /usr/share/cows/tux.cow

```

## Jonathan Nieder, 2010-07-30 20:17

Subject: Re: Git CVS Import Questions
Message-ID: <20100730201706.GC2448@burratino>
URL: https://gitlist.dev/e/20100730201706.GC2448%40burratino
In-Reply-To: <AANLkTin_d_wKxyJDMbjz4vFacr6GNYzE_aUGi2vbXW3V@mail.gmail.com>

```
Hi Samir,

Samir Faci wrote:

> mkdir bar; git cvsimport -v Foo/Bar   which checks out the history of
> module Bar into the current directory (in this case bar)
> 
> now... if I do this again in another directory
> 
> mkdir bar2; git cvsimport -v Foo/Bar  which repeats the same process
> the hashes don't match up.

Maybe the dates are different?  I would suggest comparing the result of
“git fast-export HEAD” from each.

> Now, correct me if I'm wrong.. but I thought the hashes were generated
> based on the content of the diff.

Close, but not quite.  This might help: http://progit.org/book/ch9-2.html

Have fun,
Jonathan

```
