{"thread":{"id":"7902","subject":"problem using git on cygwin","startedAt":"2007-04-30T06:25:46Z","lastAt":"2007-05-02T12:37:31Z","messageCount":5,"participants":["srinivas naga vutukuri","Johannes Schindelin","Alex Riesen","Jari Aalto"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"40733","messageId":"ace3f33d0704292325t6ab16075rbdeac40a437920e8@mail.gmail.com","threadId":"7902","inReplyTo":null,"subject":"problem using git on cygwin","fromName":"srinivas naga vutukuri","fromEmail":"srinivas.vutukuri@gmail.com","sentAt":"2007-04-30T06:25:46Z","receivedAt":"2007-04-30T06:25:46Z","isPatch":false,"sender":{"key":"srinivas.vutukuri@gmail.com","avatar":null},"body":"Hi,\n\n Am completely new to git, and following from the tutorial, to use git\nfor my project.\n\n Using git version 1.5.0.3 on cygwin (available on packages).\n\nI am able to do the steps.\n1. git init on my source\n2. git add .\n3. git commit\n\nAfter that, a new file is created for the project and after editing the file.\nam trying to put into the souce.\n\nsince it is a new file for my project git repository, am trying to add it\nbut end up with errors as follows.\n\n\n$ git add project/test.c\nerror: bad index file sha1 signature\nfatal: index file corrupt\n\ncould you please help me, what am doing wrong?\n\n\nbest regards,\nsrinivas.\n"},{"id":"40739","messageId":"Pine.LNX.4.64.0704301343020.29859@racer.site","threadId":"7902","inReplyTo":"ace3f33d0704292325t6ab16075rbdeac40a437920e8@mail.gmail.com","subject":"Re: problem using git on cygwin","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-04-30T11:46:49Z","receivedAt":"2007-04-30T11:46:49Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 30 Apr 2007, srinivas naga vutukuri wrote:\n\n> $ git add project/test.c\n> error: bad index file sha1 signature\n> fatal: index file corrupt\n\nI could imagine that you do not have \"binary mode\" default for opening \nfiles.\n\nHowever, if you do, maybe your .git/index went corrupt?\n\nAs a workaround, you could try \"git read-tree HEAD\" and then \"git add\" \nagain, but make sure you have a backup of .git/index, since it could be a \nbug in Git(cygwin) and if so, I'd like to fix it.\n\nCiao,\nDscho\n"},{"id":"40878","messageId":"ace3f33d0705012104r3cf0b99ayb2ec2a69833e6ea1@mail.gmail.com","threadId":"7902","inReplyTo":"Pine.LNX.4.64.0704301343020.29859@racer.site","subject":"Re: problem using git on cygwin","fromName":"srinivas naga vutukuri","fromEmail":"srinivas.vutukuri@gmail.com","sentAt":"2007-05-02T04:04:16Z","receivedAt":"2007-05-02T04:04:16Z","isPatch":false,"sender":{"key":"srinivas.vutukuri@gmail.com","avatar":null},"body":"Hi,\n\nOn 4/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> Hi,\n>\n> On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:\n>\n> > $ git add project/test.c\n> > error: bad index file sha1 signature\n> > fatal: index file corrupt\n>\n> I could imagine that you do not have \"binary mode\" default for opening\n> files.\n>\n\n       i do't think it is in binary mode when opening the files. I am\nused vim to create a new file and editing through that. And also am\nused file format (set ff=unix).\n\n\n> However, if you do, maybe your .git/index went corrupt?\n>\n> As a workaround, you could try \"git read-tree HEAD\" and then \"git add\"\n> again, but make sure you have a backup of .git/index, since it could be a\n> bug in Git(cygwin) and if so, I'd like to fix it.\n>\n\n     I have taken the initial index (once repository created, after\ninitial commit) to backup.\nand followed the above steps.\n\n1. cp index index.orig\n2. git read-tree HEAD\n3. git add test.c (my new file)\n\nBut end up with the same errors. Would you think there is a bug in the\ngit working on cygwin ?. I hope would the sequence help you in\ncatching the bug.\n\n\n\n> Ciao,\n> Dscho\n>\n>\n\nbest regards,\nsrinivas.\n"},{"id":"40893","messageId":"abwne8y7.fsf@cante.net","threadId":"7902","inReplyTo":"ace3f33d0705012104r3cf0b99ayb2ec2a69833e6ea1@mail.gmail.com","subject":"Re: problem using git on cygwin","fromName":"Jari Aalto","fromEmail":"jari.aalto@cante.net","sentAt":"2007-05-02T11:55:28Z","receivedAt":"2007-05-02T11:55:28Z","isPatch":false,"sender":{"key":"jari.aalto@cante.net","avatar":"https://avatars.githubusercontent.com/u/34601?v=4"},"body":"\"srinivas naga vutukuri\" <srinivas.vutukuri@gmail.com> writes:\n\n> Hi,\n>\n> On 4/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n>> Hi,\n>>\n>> On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:\n>>\n>> > $ git add project/test.c\n>> > error: bad index file sha1 signature\n>> > fatal: index file corrupt\n>>\n>> I could imagine that you do not have \"binary mode\" default for opening\n>> files.\n>\n>       i do't think it is in binary mode when opening the files. I am\n> used vim to create a new file and editing through that. And also am\n> used file format (set ff=unix).\n\nI think Johannes meant Cygwn filesystem mount attributes. Please run\n\n    $ mount\n\nAnd you should see \"binmode\". Here are examples:\n\n    D:\\cygwin on / type system (binmode)\n    D:\\cygwin\\bin on /usr/bin type system (binmode)\n    D:\\cygwin\\lib on /usr/lib type system (binmode)\n    E:\\data\\src on /usr/src type system (binmode)\n\nIf not, you need to remount directories with \"-b\" option. See man\nmount(1)\n\nJari\n"},{"id":"40891","messageId":"81b0412b0705020537g485012ffr75d5ee2c7dc600f9@mail.gmail.com","threadId":"7902","inReplyTo":"ace3f33d0705012104r3cf0b99ayb2ec2a69833e6ea1@mail.gmail.com","subject":"Re: problem using git on cygwin","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-02T12:37:31Z","receivedAt":"2007-05-02T12:37:31Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 5/2/07, srinivas naga vutukuri <srinivas.vutukuri@gmail.com> wrote:\n> > On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:\n> >\n> > > $ git add project/test.c\n> > > error: bad index file sha1 signature\n> > > fatal: index file corrupt\n> >\n> > I could imagine that you do not have \"binary mode\" default for opening\n> > files.\n> >\n>        i do't think it is in binary mode when opening the files. I am\n> used vim to create a new file and editing through that. And also am\n> used file format (set ff=unix).\n\nJohannes was referring to binary mode for writing files for _cygwin_\nitself, not for files the git has to manage. See \"Default Text File Type\"\nin cygwins setup.exe (maybe even follow the link \"Read more...\").\n"}]}