git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Still have problem with index file.

From
MOMatthew M. Ogilvie <mmogilvi_git@miniinfo.net>
Date
Jun 21, 2008, 04:49 UTC
Message-ID
<20080621044949.GA1320@comcast.net>
In-Reply-To
<485BD988.8040201@distributel.ca>
On Fri, Jun 20, 2008 at 12:23:36PM -0400, Le wrote:
Show 21 quoted lines
> 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?
> 
> 
> 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: git@vger.kernel.org.  I've read some
of the git documentation and source code, and even submitted
a few patches, but haven't really used it much.
Message 1 of 1 in “Re: Still have problem with index file.”
  1. Matthew M. OgilvieJun 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.