{"action":"created","issue":{"url":"https://api.github.com/repos/msysgit/git/issues/312","labels_url":"https://api.github.com/repos/msysgit/git/issues/312/labels{/name}","comments_url":"https://api.github.com/repos/msysgit/git/issues/312/comments","events_url":"https://api.github.com/repos/msysgit/git/issues/312/events","html_url":"https://github.com/msysgit/git/issues/312","id":56685461,"number":312,"title":"Git does not see that file in working directory differs from HEAD ","user":{"login":"j66st","id":10867890,"avatar_url":"https://avatars.githubusercontent.com/u/10867890?v=3","gravatar_id":"","url":"https://api.github.com/users/j66st","html_url":"https://github.com/j66st","followers_url":"https://api.github.com/users/j66st/followers","following_url":"https://api.github.com/users/j66st/following{/other_user}","gists_url":"https://api.github.com/users/j66st/gists{/gist_id}","starred_url":"https://api.github.com/users/j66st/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j66st/subscriptions","organizations_url":"https://api.github.com/users/j66st/orgs","repos_url":"https://api.github.com/users/j66st/repos","events_url":"https://api.github.com/users/j66st/events{/privacy}","received_events_url":"https://api.github.com/users/j66st/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-02-05T15:35:28Z","updated_at":"2015-02-05T19:06:32Z","closed_at":null,"body":"I found a strange problem in msysGit, I am wondering if it's a bug.\r\nI already discussed it here:\r\nhttps://groups.google.com/forum/#!topic/msysgit/6XLoSPH26kc\r\nYou can download my Demo.zip attachment there.\r\nIt seems not to happen in Git for Linux or OS-X.\r\nThe problem occurs in msysGit 1.9.0 and 1.9.5 (running x86 version on a Windows 7 x64 system).\r\n\r\nEssentially, the problem seems that Git for Windows assumes that two files are the same when both  the timestamp and the file size match. Obviously the file contents is not inspected nor the hash recalculated.\r\n\r\nAs mentioned I created a minimal demo package to easily prove the issue. Simply download the zip file, put it in a clean directory and run the enclosed script from bash. Below is a transcript of what happens when I run the script in my situation.\r\n\r\nThe issue is a real show-stopper in my automated migration from Visual SourceSafe to Git (in a test transferring 20,000 source files the problem caused loss of roughly 0.1% of the files from the history), so I hope for a quick solution.\r\n\r\n``` ShellSession\r\nWelcome to Git (version 1.9.5-preview20141217)\r\n\r\n\r\nRun 'git help git' to display the help index.\r\nRun 'git help <command>' to display help for specific commands.\r\n\r\njoostadm@MUPC20 ~\r\n$ cd /d/proj/try/git\r\n\r\njoostadm@MUPC20 /d/proj/try/git\r\n$ ls -l\r\ntotal 15\r\n-rw-r--r--    1 joostadm Administ    26968 Jan 23 18:43 DixiLink2.zip\r\n-rwxr-xr-x    1 joostadm Administ     1848 Feb  5 14:05 weird-git-demo\r\n\r\njoostadm@MUPC20 /d/proj/try/git\r\n$ weird-git-demo\r\nNote: No argument supplied, using DemoRepo by default.\r\n+ mkdir DemoRepo\r\n+ cd DemoRepo\r\n+ unzip ../DixiLink2.zip\r\nArchive:  ../DixiLink2.zip\r\n   creating: .git/\r\n extracting: .git/COMMIT_EDITMSG\r\n  inflating: .git/config\r\n  inflating: .git/description\r\n  inflating: .git/gitk.cache\r\n extracting: .git/HEAD\r\n   creating: .git/hooks/\r\n  inflating: .git/hooks/applypatch-msg.sample\r\n  inflating: .git/hooks/commit-msg.sample\r\n  inflating: .git/hooks/post-update.sample\r\n  inflating: .git/hooks/pre-applypatch.sample\r\n  inflating: .git/hooks/pre-commit.sample\r\n  inflating: .git/hooks/pre-push.sample\r\n  inflating: .git/hooks/pre-rebase.sample\r\n  inflating: .git/hooks/prepare-commit-msg.sample\r\n  inflating: .git/hooks/update.sample\r\n  inflating: .git/index\r\n   creating: .git/info/\r\n  inflating: .git/info/exclude\r\n   creating: .git/logs/\r\n  inflating: .git/logs/HEAD\r\n   creating: .git/logs/refs/\r\n   creating: .git/logs/refs/heads/\r\n  inflating: .git/logs/refs/heads/master\r\n   creating: .git/objects/\r\n   creating: .git/objects/29/\r\n extracting: .git/objects/29/c51bbb9ada43dbe98cbd5dbedbab56586b24c3\r\n   creating: .git/objects/68/\r\n extracting: .git/objects/68/b1f129eb06b91fc6c9a3885fc0d24ad0cdaa50\r\n   creating: .git/objects/7e/\r\n extracting: .git/objects/7e/8d94849a38370141b3ca2aab5c3cadc27934da\r\n   creating: .git/objects/cf/\r\n extracting: .git/objects/cf/13dbb766d4aff04ad51d3cdac84fda67dc6f50\r\n   creating: .git/objects/da/\r\n extracting: .git/objects/da/eca6b50a218a78e4cca5566965381e2d384b7f\r\n   creating: .git/objects/de/\r\n extracting: .git/objects/de/3643596c73be4f6112d027616c8df31acd1b09\r\n   creating: .git/objects/ec/\r\n extracting: .git/objects/ec/88fb155c5e9ebd8b3ead39345618517c0af6cf\r\n   creating: .git/objects/info/\r\n   creating: .git/objects/pack/\r\n   creating: .git/refs/\r\n   creating: .git/refs/heads/\r\n extracting: .git/refs/heads/master\r\n   creating: .git/refs/tags/\r\n extracting: .git/refs/tags/2011-11-24\r\n  inflating: dixilinkerr.h\r\n+ echo 'This repository now contains version 1 and 2 of dixilinkerr.h:'\r\nThis repository now contains version 1 and 2 of dixilinkerr.h:\r\n+ git log\r\ncommit cf13dbb766d4aff04ad51d3cdac84fda67dc6f50\r\nAuthor: Joost <joost@localhost>\r\nDate:   Tue Sep 11 09:57:32 2007 +0000\r\n\r\n    @VSS 11-09-2007 11:08:35 [Edit] dixilinkerr.h\r\n\r\ncommit de3643596c73be4f6112d027616c8df31acd1b09\r\nAuthor: Joost <joost@localhost>\r\nDate:   Fri Jul 6 12:27:57 2007 +0000\r\n\r\n    @VSS 01-06-2007 01:54:53 [Create] dixilinkerr.h\r\n+ echo 'Version 3 is in our working directory:'\r\nVersion 3 is in our working directory:\r\n+ head -n 12 dixilinkerr.h\r\n// DixiLinkErr.h\r\n\r\n#pragma once\r\n\r\n#ifndef EXCPCAT_DIXILINK\r\n#define EXCPCAT_DIXILINK 2000\r\n#endif\r\n\r\n#ifndef __DixiLinkErr_H_INCLUDED__\r\n#define __DixiLinkErr_H_INCLUDED__\r\n\r\n#ifndef IDL_ENUM\r\n+ echo 'The file in our HEAD'\r\nThe file in our HEAD\r\n+ git show HEAD:dixilinkerr.h\r\n+ head -n 12\r\n// DixiLinkErr.h\r\n\r\n#pragma once\r\n\r\n#ifndef CAT_DIXILINK_ERR\r\n#define CAT_DIXILINK_ERR 2000\r\n#endif\r\n\r\n#ifndef __DixiLinkErr_H_INCLUDED__\r\n#define __DixiLinkErr_H_INCLUDED__\r\n\r\n#ifndef IDL_ENUM\r\n+ echo 'You see? Working copy differs from HEAD.'\r\nYou see? Working copy differs from HEAD.\r\n+ echo 'So the working directory is dirty, right? Ask Git:'\r\nSo the working directory is dirty, right? Ask Git:\r\n+ git status\r\nOn branch master\r\nnothing to commit, working directory clean\r\n+ git diff\r\n+ echo 'In my situation, Git sees no difference here, I THINK THIS IS WRONG!'\r\nIn my situation, Git sees no difference here, I THINK THIS IS WRONG!\r\n+ echo 'So we are unable to add version 3 of our file. Let'\\''s try it once again:'\r\nSo we are unable to add version 3 of our file. Let's try it once again:\r\n+ git add dixilinkerr.h\r\n+ git status\r\nOn branch master\r\nnothing to commit, working directory clean\r\n+ echo 'In my situation at this point there is nothing to add or commit.'\r\nIn my situation at this point there is nothing to add or commit.\r\n+ echo 'End of demo'\r\nEnd of demo\r\n\r\njoostadm@MUPC20 /d/proj/try/git\r\n$ \r\n```"},"comment":{"url":"https://api.github.com/repos/msysgit/git/issues/comments/73106053","html_url":"https://github.com/msysgit/git/issues/312#issuecomment-73106053","issue_url":"https://api.github.com/repos/msysgit/git/issues/312","id":73106053,"user":{"login":"sschuberth","id":349154,"avatar_url":"https://avatars.githubusercontent.com/u/349154?v=3","gravatar_id":"","url":"https://api.github.com/users/sschuberth","html_url":"https://github.com/sschuberth","followers_url":"https://api.github.com/users/sschuberth/followers","following_url":"https://api.github.com/users/sschuberth/following{/other_user}","gists_url":"https://api.github.com/users/sschuberth/gists{/gist_id}","starred_url":"https://api.github.com/users/sschuberth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschuberth/subscriptions","organizations_url":"https://api.github.com/users/sschuberth/orgs","repos_url":"https://api.github.com/users/sschuberth/repos","events_url":"https://api.github.com/users/sschuberth/events{/privacy}","received_events_url":"https://api.github.com/users/sschuberth/received_events","type":"User","site_admin":false},"created_at":"2015-02-05T19:06:32Z","updated_at":"2015-02-05T19:06:32Z","body":"I also always thought that Git is only tracking file *contents*, and nothing else. But meanwhile [Hannes replied to the corresponding mailing list thread](https://groups.google.com/d/msg/msysgit/6XLoSPH26kc/llGY_1yRGOIJ) saying something different ..."}}