git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug Report] Refresh of a repository after changing line endings behaves erratically
@ 2014-11-08  4:32 Haim Gelfenbeyn
  0 siblings, 0 replies; only message in thread
From: Haim Gelfenbeyn @ 2014-11-08  4:32 UTC (permalink / raw)
  To: git

Hello,
I found out that following steps outlined in https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings results in different outcomes from one execution to another, done on the same repository repeatedly:

STEPS I TOOK:

1. Comitted .gitattributes file that sets some extensions to "text eol=crlf".
2. Did repository refresh:
rm -Rf *
git rm --cached -r .
git reset --hard

3. Expected result: files listed as "changed". Received result: sometimes it works, sometimes it doesn't: git reports "working directory clean".

HOW TO REPRODUCE:

1. Clone my repository with a committed .gitattributes, but still not-refreshed files:
git clone https://github.com/hageltech/msgit_test.git

2. Run this one liner while inside the git repository:
for i in `seq 1 100` ; do  rm -Rf * && git rm -q --cached -r . && git reset --hard -q && git status | wc -l ; done

3. You should be getting 100 lines of "71" (number of lines of output from git status), but in reality some lines will be "3", "20", etc. Git sometimes does not report all files as changed, when it should. 

For me, it happens with frequency of 3-5% with Git 2.2.0.rc1 on Linux, and with  frequency of around 40% with 1.9.4.msysgit.2 on Windows 7, on two different machines.  I initially thought this is Msysgit issue and took it to their issue tracker, where it was confirmed by other users: https://github.com/msysgit/git/issues/229  . However, it does occur with latest git version, compiled from git source, too.

Best regards

-- 
Haim Gelfenbeyn
Hagel Technologies Ltd.
www.hageltech.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-08  4:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-08  4:32 [Bug Report] Refresh of a repository after changing line endings behaves erratically Haim Gelfenbeyn

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