Re: [PATCH] Use "-f" when adding files with odd names in t9200.
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 4, 2007, 01:09 UTC
- Message-ID
- <7vr6t6zq2d.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <7vlkje243u.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 13 quoted lines
> ... I suspect that this sequence may not work as > expected: > > #!/bin/sh > > pathname='a pathname that canonicalize differently from original' > rm -fr testrepo > mkdir testrepo > cd testrepo > git init-db > echo hello >"$pathname" > git add -f . > git ls-files -s "$pathname"
Addendum.
This is not to make any point but purely for my own education, but I wonder what would happen on HFS+ to the following sequence, which does not involve any git operation:
#!/bin/sh LANG=C LC_ALL=C export LANG LC_ALL
pathname='a pathname that canonicalize differently from original' rm -fr testrepo mkdir testrepo cd testrepo echo hello >"$pathname" /bin/ls | fgrep -e "$pathname"
Doesn't the grep fail to find the file that was successfully created in the previous step?