git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* problem using git on cygwin
@ 2007-04-30  6:25 srinivas naga vutukuri
  2007-04-30 11:46 ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: srinivas naga vutukuri @ 2007-04-30  6:25 UTC (permalink / raw)
  To: git

Hi,

 Am completely new to git, and following from the tutorial, to use git
for my project.

 Using git version 1.5.0.3 on cygwin (available on packages).

I am able to do the steps.
1. git init on my source
2. git add .
3. git commit

After that, a new file is created for the project and after editing the file.
am trying to put into the souce.

since it is a new file for my project git repository, am trying to add it
but end up with errors as follows.


$ git add project/test.c
error: bad index file sha1 signature
fatal: index file corrupt

could you please help me, what am doing wrong?


best regards,
srinivas.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem using git on cygwin
  2007-04-30  6:25 problem using git on cygwin srinivas naga vutukuri
@ 2007-04-30 11:46 ` Johannes Schindelin
  2007-05-02  4:04   ` srinivas naga vutukuri
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2007-04-30 11:46 UTC (permalink / raw)
  To: srinivas naga vutukuri; +Cc: git

Hi,

On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:

> $ git add project/test.c
> error: bad index file sha1 signature
> fatal: index file corrupt

I could imagine that you do not have "binary mode" default for opening 
files.

However, if you do, maybe your .git/index went corrupt?

As a workaround, you could try "git read-tree HEAD" and then "git add" 
again, but make sure you have a backup of .git/index, since it could be a 
bug in Git(cygwin) and if so, I'd like to fix it.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem using git on cygwin
  2007-04-30 11:46 ` Johannes Schindelin
@ 2007-05-02  4:04   ` srinivas naga vutukuri
  2007-05-02 11:55     ` Jari Aalto
  2007-05-02 12:37     ` Alex Riesen
  0 siblings, 2 replies; 5+ messages in thread
From: srinivas naga vutukuri @ 2007-05-02  4:04 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

Hi,

On 4/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:
>
> > $ git add project/test.c
> > error: bad index file sha1 signature
> > fatal: index file corrupt
>
> I could imagine that you do not have "binary mode" default for opening
> files.
>

       i do't think it is in binary mode when opening the files. I am
used vim to create a new file and editing through that. And also am
used file format (set ff=unix).


> However, if you do, maybe your .git/index went corrupt?
>
> As a workaround, you could try "git read-tree HEAD" and then "git add"
> again, but make sure you have a backup of .git/index, since it could be a
> bug in Git(cygwin) and if so, I'd like to fix it.
>

     I have taken the initial index (once repository created, after
initial commit) to backup.
and followed the above steps.

1. cp index index.orig
2. git read-tree HEAD
3. git add test.c (my new file)

But end up with the same errors. Would you think there is a bug in the
git working on cygwin ?. I hope would the sequence help you in
catching the bug.



> Ciao,
> Dscho
>
>

best regards,
srinivas.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem using git on cygwin
  2007-05-02  4:04   ` srinivas naga vutukuri
@ 2007-05-02 11:55     ` Jari Aalto
  2007-05-02 12:37     ` Alex Riesen
  1 sibling, 0 replies; 5+ messages in thread
From: Jari Aalto @ 2007-05-02 11:55 UTC (permalink / raw)
  To: git

"srinivas naga vutukuri" <srinivas.vutukuri@gmail.com> writes:

> Hi,
>
> On 4/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> Hi,
>>
>> On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:
>>
>> > $ git add project/test.c
>> > error: bad index file sha1 signature
>> > fatal: index file corrupt
>>
>> I could imagine that you do not have "binary mode" default for opening
>> files.
>
>       i do't think it is in binary mode when opening the files. I am
> used vim to create a new file and editing through that. And also am
> used file format (set ff=unix).

I think Johannes meant Cygwn filesystem mount attributes. Please run

    $ mount

And you should see "binmode". Here are examples:

    D:\cygwin on / type system (binmode)
    D:\cygwin\bin on /usr/bin type system (binmode)
    D:\cygwin\lib on /usr/lib type system (binmode)
    E:\data\src on /usr/src type system (binmode)

If not, you need to remount directories with "-b" option. See man
mount(1)

Jari

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: problem using git on cygwin
  2007-05-02  4:04   ` srinivas naga vutukuri
  2007-05-02 11:55     ` Jari Aalto
@ 2007-05-02 12:37     ` Alex Riesen
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Riesen @ 2007-05-02 12:37 UTC (permalink / raw)
  To: srinivas naga vutukuri; +Cc: Johannes Schindelin, git

On 5/2/07, srinivas naga vutukuri <srinivas.vutukuri@gmail.com> wrote:
> > On Mon, 30 Apr 2007, srinivas naga vutukuri wrote:
> >
> > > $ git add project/test.c
> > > error: bad index file sha1 signature
> > > fatal: index file corrupt
> >
> > I could imagine that you do not have "binary mode" default for opening
> > files.
> >
>        i do't think it is in binary mode when opening the files. I am
> used vim to create a new file and editing through that. And also am
> used file format (set ff=unix).

Johannes was referring to binary mode for writing files for _cygwin_
itself, not for files the git has to manage. See "Default Text File Type"
in cygwins setup.exe (maybe even follow the link "Read more...").

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-02 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30  6:25 problem using git on cygwin srinivas naga vutukuri
2007-04-30 11:46 ` Johannes Schindelin
2007-05-02  4:04   ` srinivas naga vutukuri
2007-05-02 11:55     ` Jari Aalto
2007-05-02 12:37     ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).