Skip to contentSkip to conversation

Still have problem with index file.

DISCUSSION Matthew M. Ogilvie 1 participant 1 message Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 18 lines · Le

Hi, Matthew,

I am using the latest version of git cvsserver:
md5sum /usr/bin/git-cvsserver fdb0396298d51b37791161f4e62536ce /usr/bin/git-cvsserver

which has your patch. But I still have the problem of index file by commit new change:
cvs commit: Examining .
Index already exists in git repo

I have heard that one can delete the index file in .git.
Is it the right solution for this problem?
After deleted this file the git repository is still working as before? I mean it is available for cvs client sand git clients
at the same time?

Quoted 3 lines

Thank you!

Le

I hadn't seen this message before, and it is not really related to my crlf patch, but I did find some limited information via google:
http://www.gelato.unsw.edu.au/archives/git/0605/21177.html

My own take on it:

git-cvsserver has always expected to serve up a "bare" repository (without an index file or checked out
files, using the plain git [no CVS] notion of "checked out"). git-cvsserver uses a simple hueristic of checking for a ".git/index" file to check for a bare repository before allowing commits, otherwise it could mess up the HEAD for the checkout.

In answer to your question, if you haven't made any uncommitted changes to the working files in your git repository, then it should be safe to delete those working files and the .git/index file that goes with them. Just make sure you have backups, and be careful not to delete anything else under .git. If you do have uncommitted changes, you may want to "git commit" them first.

You may also want to look up "gitcvs-migration", especially the part about "Setting Up a Shared Repository".
http://www.kernel.org/pub/software/scm/git/docs/gitcvs-migration.html

I noticed that neither the man page for git-cvsimport nor for git-cvsserver mention anything about bare repositories. I'll look into improving the documentation.

- Matthew Ogilvie

PS: Also, in the future it might be better to at least CC the git mailing list, as I've just done: [email protected]. I've read some of the git documentation and source code, and even submitted a few patches, but haven't really used it much.