From: Linus Torvalds <torvalds@osdl.org>
To: Aubrey <aubreylee@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Quick question: how to generate a patch?
Date: Mon, 27 Feb 2006 09:19:35 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602270909500.22647@g5.osdl.org> (raw)
In-Reply-To: <6d6a94c50602270902k2c06aaffw7e70268b0753ef64@mail.gmail.com>
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
prev parent reply other threads:[~2006-02-27 17:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 14:57 Quick question: how to generate a patch? Aubrey
2006-02-27 15:28 ` Andreas Ericsson
2006-02-27 16:04 ` Linus Torvalds
2006-02-27 16:18 ` Aubrey
2006-02-27 16:32 ` Linus Torvalds
2006-02-27 17:02 ` Aubrey
2006-02-27 17:09 ` Andreas Ericsson
2006-02-27 17:18 ` Aubrey
2006-02-27 17:28 ` Linus Torvalds
2006-02-28 1:55 ` Aubrey
2006-02-28 2:09 ` Linus Torvalds
2006-02-28 2:48 ` Aubrey
2006-02-27 17:19 ` Linus Torvalds [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0602270909500.22647@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=aubreylee@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).