threads / discuss / 24572

Git CVS Import Questions

Subject: Git CVS Import Questions

## tl;dr

2 messages between Jul 29, 2010 and Jul 30, 2010.

replies: 1people: 2as markdown or json

Samir Faci· Jul 29, 2010, 14:17 UTC · lore
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· Jul 30, 2010, 20:17 UTC · re: Samir Faci · lore

Re: Git CVS Import Questions

Hi Samir,
Samir Faci wrote:
Show 7 quoted 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.

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

← back to recent threads