Re: Quick question: how to generate a patch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 28 Feb 2006, Aubrey wrote:
> 
> =================================================================
> aubrey@linux:/checkout/uboot/patch/work/drivers> git diff
> ----snip----
> diff --git a/drivers/sk98lin/skxmac2.c b/drivers/sk98lin/skxmac2.c
> diff --git a/drivers/sk98lin/u-boot_compat.h b/drivers/sk98lin/u-boot_compat.h

Ok, this is _definitely_ your index being out of touch with your file 
contents.

Run "git-update-index --refresh" and it should be ok.

Now the question is why the index got out-of-kilter with the file contents 
in the first place. I used to have all these debug aids to show why git 
thought a file had changed, but we've not had any bugs here for a long 
long time, so..

The final checkout of the "git clone" should have made sure that the index 
is up-to-date.

> >         git clone remote-repo localdir
> >         cd localdir
> >         vi somefile
> >         git diff
>
> Yes, exactly right.
> 
> > then you did everything right, and if it gives any diff other than your
> > changes to "somefile", something is buggy. Need more info.
> >
> > Does "git diff" and "git diff HEAD" give different results, btw?
> 
> Yes. the two commands give the same results.
> 
> I'm using git-1.2.3

What OS/filesystem? 

The way the index keeps track of files that haven't changed is by checking 
the size, the mtime and the ctime of the inode. It also checks the 
user/gid and inode number. If you use a filesystem where those might 
change (networked?), that might cause this..

		Linus
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]