{"thread":{"id":"19281","subject":"[BUG] reset abusive symlink removal; possible submodule-add misbehaviour","startedAt":"2009-05-11T08:59:19Z","lastAt":"2009-05-11T08:59:19Z","messageCount":1,"participants":["Yann Dirson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"113525","messageId":"46017.10.0.0.1.1242032359.squirrel@intranet.linagora.com","threadId":"19281","inReplyTo":null,"subject":"[BUG] reset abusive symlink removal; possible submodule-add misbehaviour","fromName":"Yann Dirson","fromEmail":"ydirson@linagora.com","sentAt":"2009-05-11T08:59:19Z","receivedAt":"2009-05-11T08:59:19Z","isPatch":false,"sender":{"key":"ydirson@linagora.com","avatar":null},"body":"This happenned to me while playing with changing from a manual\nunversionned symlink to a submodule:\n\n~/tmp/super$ ls -la\ntotal 16\ndrwxr-xr-x 3 yann yann 4096 mai 11 10:49 .\ndrwxr-xr-x 4 yann yann 4096 mai 11 10:48 ..\ndrwxr-xr-x 8 yann yann 4096 mai 11 10:49 .git\n-rw-r--r-- 1 yann yann    4 mai 11 10:48 README\nlrwxrwxrwx 1 yann yann    6 mai 11 10:49 sub -> ../sub\n~/tmp/super$ git status\n# On branch master\n# Untracked files:\n#   (use \"git add <file>...\" to include in what will be committed)\n#\n#       sub\nnothing added to commit but untracked files present (use \"git add\" to track)\n~/tmp/super$ ls -la ../sub\ntotal 12\ndrwxr-xr-x 3 yann yann 4096 mai 11 10:48 .\ndrwxr-xr-x 4 yann yann 4096 mai 11 10:48 ..\ndrwxr-xr-x 7 yann yann 4096 mai 11 10:48 .git\n~/tmp/super$ git submodule add git://anything sub\nAdding existing repo at 'sub' to the index\n~/tmp/super$ ls -la\ntotal 20\ndrwxr-xr-x 3 yann yann 4096 mai 11 10:50 .\ndrwxr-xr-x 4 yann yann 4096 mai 11 10:48 ..\ndrwxr-xr-x 8 yann yann 4096 mai 11 10:50 .git\n-rw-r--r-- 1 yann yann   52 mai 11 10:50 .gitmodules\n-rw-r--r-- 1 yann yann    4 mai 11 10:48 README\nlrwxrwxrwx 1 yann yann    6 mai 11 10:49 sub -> ../sub\n\nHere I realise the symlink may have had unwanted effects.  But shouldn't\nit have \"submodule add\" failed here, since the target already exists ?\n\n~/tmp/super$ git reset --hard\nHEAD is now at abb75d6 foo\nyann@cyann:~/tmp/super$ ls -la\ntotal 16\ndrwxr-xr-x 3 yann yann 4096 mai 11 10:50 .\ndrwxr-xr-x 4 yann yann 4096 mai 11 10:48 ..\ndrwxr-xr-x 8 yann yann 4096 mai 11 10:50 .git\n-rw-r--r-- 1 yann yann    4 mai 11 10:48 README\n\nAlthough not critical, this seems to qualify as data loss.\n"}]}