git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to revert changes in working tree?
@ 2006-12-06  6:49 Liu Yubao
  2006-12-06  8:43 ` Alex Riesen
  0 siblings, 1 reply; 11+ messages in thread
From: Liu Yubao @ 2006-12-06  6:49 UTC (permalink / raw)
  To: git

I'm confused how to revert changes in working tree:

$ git fetch
$ git merge "sync with origin" HEAD origin
....conflict....

$ git branch
* master
  origin

$ git status
# .....: needs update
# .....: needs update
(In fact I never modified anything in this tree, and "git diff"
showed many difference indeed, very strange).

I tried "git update-index --refresh", "git reset --hard",
"git reset --hard master", "git checkout master", 
"git checkout -f master", but "git status" still said same
as above.

At last, I deleted all files that were reported to be updated
with "rm -rf", ran "git checkout master" and "git status", then
git reported:
#       deleted:    ....
#       deleted:    ....


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

* Re: how to revert changes in working tree?
  2006-12-06  6:49 how to revert changes in working tree? Liu Yubao
@ 2006-12-06  8:43 ` Alex Riesen
  2006-12-06  9:57   ` Liu Yubao
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Riesen @ 2006-12-06  8:43 UTC (permalink / raw)
  To: Liu Yubao; +Cc: git

On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
> I'm confused how to revert changes in working tree:
>
> $ git fetch
> $ git merge "sync with origin" HEAD origin
> ....conflict....

You may want to consider git pull. It'd do exactly the same

> $ git branch
> * master
>   origin
>
> $ git status
> # .....: needs update
> # .....: needs update
> (In fact I never modified anything in this tree, and "git diff"
> showed many difference indeed, very strange).

That's windows and cygwin for you. They work together
and may someday even figure how to commit the changes.

They problem is the exec-bit which windows does not
have and cygwin failed to correctly workaround the
limitation.

Do a "git repo-config core.filemode false" to almost
disable the checks for exec bit.

> I tried "git update-index --refresh", "git reset --hard",
> "git reset --hard master", "git checkout master",
> "git checkout -f master", but "git status" still said same
> as above.

After git update-index --refresh you shouldn't have had
the diffs (unless you actually had textual changes).

> At last, I deleted all files that were reported to be updated
> with "rm -rf", ran "git checkout master" and "git status", then
> git reported:
> #       deleted:    ....
> #       deleted:    ....

Now do a git reset --hard and you should be set,
unless you're unlucky enough to work on FAT,
where probably nothing will save you.

And avoid using any "special" characters (8bit, utf/unicode)
in filenames, while you're on windows: you'll never be able
to share the repository (unless others agree to use your

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

* Re: how to revert changes in working tree?
  2006-12-06  8:43 ` Alex Riesen
@ 2006-12-06  9:57   ` Liu Yubao
  2006-12-06 10:20     ` Alex Riesen
  2006-12-06 10:20     ` Jakub Narebski
  0 siblings, 2 replies; 11+ messages in thread
From: Liu Yubao @ 2006-12-06  9:57 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

Alex Riesen wrote:
> On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
>> I'm confused how to revert changes in working tree:
>>
>> $ git fetch
>> $ git merge "sync with origin" HEAD origin
>> ....conflict....
> 
> You may want to consider git pull. It'd do exactly the same

It's said somewhere "git pull" has strange behaviour and fetch+pull
is recommended.

> 
>> $ git branch
>> * master
>>   origin
>>
>> $ git status
>> # .....: needs update
>> # .....: needs update

sorry, I made a mistake, that should come from "git merge",
here is the message from "git status":
# Changed but not updated:
#   (use git-update-index to mark for commit)
#
#       modified:   include/linux/netfilter/xt_CONNMARK.h
#       modified:   include/linux/netfilter/xt_DSCP.h
#       modified:   include/linux/netfilter/xt_MARK.h
#       modified:   include/linux/netfilter_ipv4/ipt_CONNMARK.h
#       modified:   include/linux/netfilter_ipv4/ipt_DSCP.h
#       modified:   include/linux/netfilter_ipv4/ipt_ECN.h
#       modified:   include/linux/netfilter_ipv4/ipt_MARK.h
#       modified:   include/linux/netfilter_ipv4/ipt_TCPMSS.h
#       modified:   include/linux/netfilter_ipv4/ipt_TOS.h
#       modified:   include/linux/netfilter_ipv4/ipt_TTL.h
#       modified:   include/linux/netfilter_ipv6/ip6t_HL.h
#       modified:   include/linux/netfilter_ipv6/ip6t_MARK.h
#       modified:   net/ipv4/netfilter/ipt_ECN.c
#       modified:   net/ipv4/netfilter/ipt_TOS.c
#       modified:   net/ipv4/netfilter/ipt_TTL.c
#       modified:   net/ipv6/netfilter/ip6t_HL.c
#       modified:   net/netfilter/xt_CONNMARK.c
#       modified:   net/netfilter/xt_DSCP.c
#       modified:   net/netfilter/xt_MARK.c
#
nothing to commit

>> (In fact I never modified anything in this tree, and "git diff"
>> showed many difference indeed, very strange).
> 
> That's windows and cygwin for you. They work together
> and may someday even figure how to commit the changes.

Yes, I am using cygwin :-(

> 
> They problem is the exec-bit which windows does not
> have and cygwin failed to correctly workaround the
> limitation.
> 
> Do a "git repo-config core.filemode false" to almost
> disable the checks for exec bit.
> 

It has been set. I guess the cause is a interrupted merge
operation that leads to textual difference.

>> I tried "git update-index --refresh", "git reset --hard",
>> "git reset --hard master", "git checkout master",
>> "git checkout -f master", but "git status" still said same
>> as above.
> 
> After git update-index --refresh you shouldn't have had
> the diffs (unless you actually had textual changes).
> 
>> At last, I deleted all files that were reported to be updated
>> with "rm -rf", ran "git checkout master" and "git status", then
>> git reported:
>> #       deleted:    ....
>> #       deleted:    ....
> 
> Now do a git reset --hard and you should be set,
> unless you're unlucky enough to work on FAT,
> where probably nothing will save you.
> 

After run "git reset --hard", all deleted files come back, but I reach
the old state:
$ git status
# Changed but not updated:
#   (use git-update-index to mark for commit)
#
#       modified:   include/linux/netfilter/xt_CONNMARK.h
#       modified:   include/linux/netfilter/xt_DSCP.h
...
#       modified:   net/netfilter/xt_MARK.c
#
nothing to commit

> And avoid using any "special" characters (8bit, utf/unicode)
> in filenames, while you're on windows: you'll never be able
> to share the repository (unless others agree to use your
> rules for language and filesystem encoding).
> 
In fact, I'm operating the linux-2.6 tree, so no special characters.


HEAD: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
master: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
origin: commit ff51a98799931256b555446b2f5675db08de6229
"git diff --cached" shows nothing;
"git diff" shows many diffs:

diff --git a/include/linux/netfilter/xt_CONNMARK.h b/include/linux/netfilter/xt_CONNMARK.h
index 9f74468..c592f6a 100644
--- a/include/linux/netfilter/xt_CONNMARK.h
+++ b/include/linux/netfilter/xt_CONNMARK.h
@@ -1,5 +1,5 @@
-#ifndef _XT_CONNMARK_H_target
-#define _XT_CONNMARK_H_target
+#ifndef _XT_CONNMARK_H
+#define _XT_CONNMARK_H

 /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com>
  * by Henrik Nordstrom <hno@marasystems.com>
@@ -10,16 +10,9 @@
  * (at your option) any later version.
  */

-enum {
-       XT_CONNMARK_SET = 0,
-       XT_CONNMARK_SAVE,
-       XT_CONNMARK_RESTORE
+struct xt_connmark_info {
+       unsigned long mark, mask;
+       u_int8_t invert;
 };
.....


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

* Re: how to revert changes in working tree?
  2006-12-06  9:57   ` Liu Yubao
@ 2006-12-06 10:20     ` Alex Riesen
  2006-12-06 11:14       ` Liu Yubao
  2006-12-06 10:20     ` Jakub Narebski
  1 sibling, 1 reply; 11+ messages in thread
From: Alex Riesen @ 2006-12-06 10:20 UTC (permalink / raw)
  To: Liu Yubao; +Cc: git

On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
> Alex Riesen wrote:
> > On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
> >> I'm confused how to revert changes in working tree:
> >>
> >> $ git fetch
> >> $ git merge "sync with origin" HEAD origin
> >> ....conflict....
> >
> > You may want to consider git pull. It'd do exactly the same
>
> It's said somewhere "git pull" has strange behaviour and fetch+pull
> is recommended.

So why do you use fetch+merge?

> sorry, I made a mistake, that should come from "git merge",

so, you just have an unresolved merge.
It was discussed on this mailing list very recently
(and actually is being discussed), so just look at
the archives.

> > They problem is the exec-bit which windows does not
> > have and cygwin failed to correctly workaround the
> > limitation.
> >
> > Do a "git repo-config core.filemode false" to almost
> > disable the checks for exec bit.
> >
>
> It has been set. I guess the cause is a interrupted merge
> operation that leads to textual difference.

yes, though what I can't understand is why don't you have
unmerged entries... Maybe it comes from playing with
all these commands you mentioned in the original mail.

> After run "git reset --hard", all deleted files come back, but I reach
> the old state:
> $ git status

When? Immediately after git reset --hard? Then you very
likely have no permission to write (or lost it somehow) into
the working directory, otherwise I don't see could this be
possible. git reset --hard rewrites everything.

> HEAD: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
> master: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
> origin: commit ff51a98799931256b555446b2f5675db08de6229
> "git diff --cached" shows nothing;

which is correct.

> "git diff" shows many diffs:

and this is not. You do have changes, which could not be reset.
I fail to see why. Are you sure you haven't accidentally repeated
the merge after doing git reset --hard? And what was _exactly_

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

* Re: how to revert changes in working tree?
  2006-12-06  9:57   ` Liu Yubao
  2006-12-06 10:20     ` Alex Riesen
@ 2006-12-06 10:20     ` Jakub Narebski
  1 sibling, 0 replies; 11+ messages in thread
From: Jakub Narebski @ 2006-12-06 10:20 UTC (permalink / raw)
  To: git

Liu Yubao wrote:

>> Do a "git repo-config core.filemode false" to almost
>> disable the checks for exec bit.
>> 
> 
> It has been set. I guess the cause is a interrupted merge
> operation that leads to textual difference.

Try also "git repo-config core.ignoreStat true". Perhaps it would help.

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


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

* Re: how to revert changes in working tree?
  2006-12-06 10:20     ` Alex Riesen
@ 2006-12-06 11:14       ` Liu Yubao
  2006-12-06 12:30         ` Alex Riesen
                           ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Liu Yubao @ 2006-12-06 11:14 UTC (permalink / raw)
  To: Alex Riesen; +Cc: git

Alex Riesen wrote:
> On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
>> Alex Riesen wrote:
>> > On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
>> >> I'm confused how to revert changes in working tree:
>> >>
>> >> $ git fetch
>> >> $ git merge "sync with origin" HEAD origin
>> >> ....conflict....
>> >
>> > You may want to consider git pull. It'd do exactly the same
>>
>> It's said somewhere "git pull" has strange behaviour and fetch+pull
>> is recommended.
> 
> So why do you use fetch+merge?
> 

Oh, another mistake, I have heard fetch+merge is recommended.

> so, you just have an unresolved merge.
> It was discussed on this mailing list very recently
> (and actually is being discussed), so just look at
> the archives.
> 

Thanks, I will dig it.

>> > They problem is the exec-bit which windows does not
>> > have and cygwin failed to correctly workaround the
>> > limitation.
>> >
>> > Do a "git repo-config core.filemode false" to almost
>> > disable the checks for exec bit.
>> >
>>
>> It has been set. I guess the cause is a interrupted merge
>> operation that leads to textual difference.
> 
> yes, though what I can't understand is why don't you have
> unmerged entries... Maybe it comes from playing with
> all these commands you mentioned in the original mail.
> 
>> After run "git reset --hard", all deleted files come back, but I reach
>> the old state:
>> $ git status
> 
> When? Immediately after git reset --hard? Then you very
> likely have no permission to write (or lost it somehow) into
> the working directory, otherwise I don't see could this be
> possible. git reset --hard rewrites everything.
> 
Yes, immediately after git reset --hard. I'm sure I have write
permission because all deleted files come back and no "permission
denied" like message appears.

I will try to run git in debugger, wish I can get the reason.

>> HEAD: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
>> master: commit 088406bcf66d6c7fd8a5c04c00aa410ae9077403
>> origin: commit ff51a98799931256b555446b2f5675db08de6229
>> "git diff --cached" shows nothing;
> 
> which is correct.
> 
>> "git diff" shows many diffs:
> 
> and this is not. You do have changes, which could not be reset.
> I fail to see why. Are you sure you haven't accidentally repeated
> the merge after doing git reset --hard? And what was _exactly_
> git merge told you, when it failed?
> 
I didn't run "git merge" after "git reset --hard" indeed. To get the message
from "git merge", now I run it like this:

$ git merge "sync from origin" HEAD origin
Updating 088406b..ff51a98
include/linux/netfilter/xt_CONNMARK.h: needs update
include/linux/netfilter/xt_DSCP.h: needs update
include/linux/netfilter/xt_MARK.h: needs update
include/linux/netfilter_ipv4/ipt_CONNMARK.h: needs update
include/linux/netfilter_ipv4/ipt_DSCP.h: needs update
include/linux/netfilter_ipv4/ipt_ECN.h: needs update
include/linux/netfilter_ipv4/ipt_MARK.h: needs update
include/linux/netfilter_ipv4/ipt_TCPMSS.h: needs update
include/linux/netfilter_ipv4/ipt_TOS.h: needs update
include/linux/netfilter_ipv4/ipt_TTL.h: needs update
include/linux/netfilter_ipv6/ip6t_HL.h: needs update
include/linux/netfilter_ipv6/ip6t_MARK.h: needs update
net/ipv4/netfilter/ipt_ECN.c: needs update
net/ipv4/netfilter/ipt_TOS.c: needs update
net/ipv4/netfilter/ipt_TTL.c: needs update
net/ipv6/netfilter/ip6t_HL.c: needs update
net/netfilter/xt_CONNMARK.c: needs update
net/netfilter/xt_DSCP.c: needs update
net/netfilter/xt_MARK.c: needs update
fatal: Entry 'net/ipv4/netfilter/ipt_ECN.c' not uptodate. Cannot merge.


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

* Re: how to revert changes in working tree?
  2006-12-06 11:14       ` Liu Yubao
@ 2006-12-06 12:30         ` Alex Riesen
  2006-12-06 12:52         ` Jakub Narebski
  2006-12-06 18:13         ` Shawn Pearce
  2 siblings, 0 replies; 11+ messages in thread
From: Alex Riesen @ 2006-12-06 12:30 UTC (permalink / raw)
  To: Liu Yubao; +Cc: git

On 12/6/06, Liu Yubao <yubao.liu@gmail.com> wrote:
> >> > They problem is the exec-bit which windows does not
> >> > have and cygwin failed to correctly workaround the
> >> > limitation.
> >> >
> >> > Do a "git repo-config core.filemode false" to almost
> >> > disable the checks for exec bit.
> >> >
> >>
> >> It has been set. I guess the cause is a interrupted merge
> >> operation that leads to textual difference.
> >
> > yes, though what I can't understand is why don't you have
> > unmerged entries... Maybe it comes from playing with
> > all these commands you mentioned in the original mail.
> >
> >> After run "git reset --hard", all deleted files come back, but I reach
> >> the old state:
> >> $ git status
> >
> > When? Immediately after git reset --hard? Then you very
> > likely have no permission to write (or lost it somehow) into
> > the working directory, otherwise I don't see could this be
> > possible. git reset --hard rewrites everything.
> >
> Yes, immediately after git reset --hard. I'm sure I have write
> permission because all deleted files come back and no "permission
> denied" like message appears.

Maybe you have the files open in some editor?
Otherwise something is broken. Could you try current git
(I mean something like ba988a83f0cfdafdcfdc7ed44253840ea83578fb?

> I will try to run git in debugger, wish I can get the reason.

don't think It'd be as simple as step-by-step in debugger.
Try to instrument builtin-read-tree.c or unpack-trees.c and
see if it actually updates the files...

> $ git merge "sync from origin" HEAD origin
> Updating 088406b..ff51a98

just for fun, what does following print:

  git read-tree --reset -u HEAD && git update-index --refresh


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

* Re: how to revert changes in working tree?
  2006-12-06 11:14       ` Liu Yubao
  2006-12-06 12:30         ` Alex Riesen
@ 2006-12-06 12:52         ` Jakub Narebski
  2006-12-06 18:13         ` Shawn Pearce
  2 siblings, 0 replies; 11+ messages in thread
From: Jakub Narebski @ 2006-12-06 12:52 UTC (permalink / raw)
  To: git

Liu Yubao wrote:

> I will try to run git in debugger, wish I can get the reason.

Or you can try to use GIT_TRACE.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


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

* Re: how to revert changes in working tree?
  2006-12-06 11:14       ` Liu Yubao
  2006-12-06 12:30         ` Alex Riesen
  2006-12-06 12:52         ` Jakub Narebski
@ 2006-12-06 18:13         ` Shawn Pearce
  2006-12-07  1:42           ` Liu Yubao
  2 siblings, 1 reply; 11+ messages in thread
From: Shawn Pearce @ 2006-12-06 18:13 UTC (permalink / raw)
  To: Liu Yubao; +Cc: Alex Riesen, git

Liu Yubao <yubao.liu@gmail.com> wrote:
> $ git merge "sync from origin" HEAD origin
> Updating 088406b..ff51a98
> include/linux/netfilter/xt_CONNMARK.h: needs update
> include/linux/netfilter/xt_DSCP.h: needs update
> include/linux/netfilter/xt_MARK.h: needs update
> include/linux/netfilter_ipv4/ipt_CONNMARK.h: needs update
> include/linux/netfilter_ipv4/ipt_DSCP.h: needs update
> include/linux/netfilter_ipv4/ipt_ECN.h: needs update
> include/linux/netfilter_ipv4/ipt_MARK.h: needs update
> include/linux/netfilter_ipv4/ipt_TCPMSS.h: needs update
> include/linux/netfilter_ipv4/ipt_TOS.h: needs update
> include/linux/netfilter_ipv4/ipt_TTL.h: needs update
> include/linux/netfilter_ipv6/ip6t_HL.h: needs update
> include/linux/netfilter_ipv6/ip6t_MARK.h: needs update
> net/ipv4/netfilter/ipt_ECN.c: needs update
> net/ipv4/netfilter/ipt_TOS.c: needs update
> net/ipv4/netfilter/ipt_TTL.c: needs update
> net/ipv6/netfilter/ip6t_HL.c: needs update
> net/netfilter/xt_CONNMARK.c: needs update
> net/netfilter/xt_DSCP.c: needs update
> net/netfilter/xt_MARK.c: needs update
> fatal: Entry 'net/ipv4/netfilter/ipt_ECN.c' not uptodate. Cannot merge.
> 
> I really have never modified these files manually.

You are just *very unlucky*.  :-)

The Linux kernel has case sensitive file names.  In other words there
are two files in the kernel:

  net/netfilter/xt_MARK.c
  net/netfilter/xt_mark.c

and they have different content!  On NTFS or FAT, where filenames
are not case sensitive, these become the same file.  So Git now
starts to think that the file was modified, because one of those
files overwrote the other when they were checked out.

Moral of the story: You cannot work with the linux.git repository
on a case insensitive filesystem, like NTFS, FAT (Windows), or HFS+
(Mac OS X).

-- 

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

* Re: how to revert changes in working tree?
  2006-12-06 18:13         ` Shawn Pearce
@ 2006-12-07  1:42           ` Liu Yubao
  2006-12-07  7:15             ` Juergen Ruehle
  0 siblings, 1 reply; 11+ messages in thread
From: Liu Yubao @ 2006-12-07  1:42 UTC (permalink / raw)
  To: Shawn Pearce; +Cc: Alex Riesen, git

Shawn Pearce wrote:
> 
> You are just *very unlucky*.  :-)
> 
> The Linux kernel has case sensitive file names.  In other words there
> are two files in the kernel:
> 
>   net/netfilter/xt_MARK.c
>   net/netfilter/xt_mark.c
> 
> and they have different content!  On NTFS or FAT, where filenames
> are not case sensitive, these become the same file.  So Git now
> starts to think that the file was modified, because one of those
> files overwrote the other when they were checked out.
> 
> Moral of the story: You cannot work with the linux.git repository
> on a case insensitive filesystem, like NTFS, FAT (Windows), or HFS+
> (Mac OS X).
> 
Yes, you are very right.

$ git ls-files |tr A-Z a-z | sort | uniq -c |grep -v "1 "
      2 include/linux/netfilter/xt_connmark.h
      2 include/linux/netfilter/xt_dscp.h
      2 include/linux/netfilter/xt_mark.h
      2 include/linux/netfilter_ipv4/ipt_connmark.h
      2 include/linux/netfilter_ipv4/ipt_dscp.h
      2 include/linux/netfilter_ipv4/ipt_ecn.h
      2 include/linux/netfilter_ipv4/ipt_mark.h
      2 include/linux/netfilter_ipv4/ipt_tcpmss.h
      2 include/linux/netfilter_ipv4/ipt_tos.h
      2 include/linux/netfilter_ipv4/ipt_ttl.h
      2 include/linux/netfilter_ipv6/ip6t_hl.h
      2 include/linux/netfilter_ipv6/ip6t_mark.h
      2 net/ipv4/netfilter/ipt_ecn.c
      2 net/ipv4/netfilter/ipt_tos.c
      2 net/ipv4/netfilter/ipt_ttl.c
      2 net/ipv6/netfilter/ip6t_hl.c
      2 net/netfilter/xt_connmark.c
      2 net/netfilter/xt_dscp.c
      2 net/netfilter/xt_mark.c


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

* Re: how to revert changes in working tree?
  2006-12-07  1:42           ` Liu Yubao
@ 2006-12-07  7:15             ` Juergen Ruehle
  0 siblings, 0 replies; 11+ messages in thread
From: Juergen Ruehle @ 2006-12-07  7:15 UTC (permalink / raw)
  To: Liu Yubao; +Cc: Shawn Pearce, Alex Riesen, git

Liu Yubao writes:
 > Yes, you are very right.
 > 
 > $ git ls-files |tr A-Z a-z | sort | uniq -c |grep -v "1 "
 >       2 include/linux/netfilter/xt_connmark.h
 >       2 include/linux/netfilter/xt_dscp.h
 >       2 include/linux/netfilter/xt_mark.h
 >       2 include/linux/netfilter_ipv4/ipt_connmark.h
 >       2 include/linux/netfilter_ipv4/ipt_dscp.h
 >       2 include/linux/netfilter_ipv4/ipt_ecn.h
 >       2 include/linux/netfilter_ipv4/ipt_mark.h
 >       2 include/linux/netfilter_ipv4/ipt_tcpmss.h
 >       2 include/linux/netfilter_ipv4/ipt_tos.h
 >       2 include/linux/netfilter_ipv4/ipt_ttl.h
 >       2 include/linux/netfilter_ipv6/ip6t_hl.h
 >       2 include/linux/netfilter_ipv6/ip6t_mark.h
 >       2 net/ipv4/netfilter/ipt_ecn.c
 >       2 net/ipv4/netfilter/ipt_tos.c
 >       2 net/ipv4/netfilter/ipt_ttl.c
 >       2 net/ipv6/netfilter/ip6t_hl.c
 >       2 net/netfilter/xt_connmark.c
 >       2 net/netfilter/xt_dscp.c
 >       2 net/netfilter/xt_mark.c
 > 
 > poor Windows... :-(

Incidentally I have this in my tree for a while, but it is not good
enough for general use, because you really need the original (not
lowercased) file names to resolve the problem. But my shell scripting
magic is not up to that task.

diff --git a/templates/hooks--pre-commit b/templates/hooks--pre-commit
index 723a9ef..0ceb01b 100644
--- a/templates/hooks--pre-commit
+++ b/templates/hooks--pre-commit
@@ -7,6 +7,17 @@
 #
 # To enable this hook, make this file executable.

+# Detect case challenges
+
+case_challenge=`git ls-files | tr A-Z a-z | sort | uniq -d`
+if [ -n "$case_challenge" ]
+then
+       echo >&2 "index contains file names differing only in case."
+       echo >&2 "lowercase names follow:"
+       echo >&2 "$case_challenge"
+       exit 1
+fi
+
 # This is slightly modified from Andrew Morton's Perfect Patch.
 # Lines you introduce should not have trailing whitespace.
 # Also check for an indentation that has SP before a TAB.

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

end of thread, other threads:[~2006-12-07  7:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-06  6:49 how to revert changes in working tree? Liu Yubao
2006-12-06  8:43 ` Alex Riesen
2006-12-06  9:57   ` Liu Yubao
2006-12-06 10:20     ` Alex Riesen
2006-12-06 11:14       ` Liu Yubao
2006-12-06 12:30         ` Alex Riesen
2006-12-06 12:52         ` Jakub Narebski
2006-12-06 18:13         ` Shawn Pearce
2006-12-07  1:42           ` Liu Yubao
2006-12-07  7:15             ` Juergen Ruehle
2006-12-06 10:20     ` Jakub Narebski

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).