{"thread":{"id":"3539","subject":"workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)","startedAt":"2006-03-03T10:20:18Z","lastAt":"2006-03-03T10:20:18Z","messageCount":1,"participants":["Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"17114","messageId":"81b0412b0603030220v527779a3p4818309443e330cb@mail.gmail.com","threadId":"3539","inReplyTo":null,"subject":"workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2006-03-03T10:20:18Z","receivedAt":"2006-03-03T10:20:18Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Signed-off-by: Alex Riesen <ariesen@harmanbecker.com>\n---\nchmod u-w and even chmod a-w dont work on fat and ntfs.\nThe actually do something, but rm a file from that directory\nwill succeed anyway. That's windows permission model to you...\n\n\n>From nobody Mon Sep 17 00:00:00 2001\nFrom: Alex Riesen <raa.lkml@gmail.com>\nDate: Fri Mar 3 11:15:05 2006 +0100\nSubject: workaround fat/ntfs deficiencies for t3600-rm.sh (git-rm)\n\n---\n\n t/t3600-rm.sh |   23 +++++++++++++++++------\n 1 files changed, 17 insertions(+), 6 deletions(-)\n\n583a9faeab3a200fc970577458b7827d86aa7df1\ndiff --git a/t/t3600-rm.sh b/t/t3600-rm.sh\nindex cabfadd..d1947e1 100755\n--- a/t/t3600-rm.sh\n+++ b/t/t3600-rm.sh\n@@ -8,11 +8,20 @@ test_description='Test of the various op\n . ./test-lib.sh\n \n # Setup some files to be removed, some with funny characters\n-touch -- foo bar baz 'space embedded' 'tab\tembedded' 'newline\n-embedded' -q\n-git-add -- foo bar baz 'space embedded' 'tab\tembedded' 'newline\n-embedded' -q\n-git-commit -m \"add files\"\n+touch -- foo bar baz 'space embedded' -q\n+git-add -- foo bar baz 'space embedded' -q\n+git-commit -m \"add normal files\"\n+test_tabs=y\n+if touch -- 'tab\tembedded' 'newline\n+embedded'\n+then\n+git-add -- 'tab\tembedded' 'newline\n+embedded'\n+git-commit -m \"add files with tabs and newlines\"\n+else\n+    say 'Your filesystem does not allow tabs in filenames.'\n+    test_tabs=n\n+fi\n \n test_expect_success \\\n     'Pre-check that foo exists and is in index before git-rm foo' \\\n@@ -42,16 +51,18 @@ test_expect_success \\\n     'Test that \"git-rm -- -q\" succeeds (remove a file that looks like an option)' \\\n     'git-rm -- -q'\n \n-test_expect_success \\\n+test \"$test_tabs\" = y && test_expect_success \\\n     \"Test that \\\"git-rm -f\\\" succeeds with embedded space, tab, or newline characters.\" \\\n     \"git-rm -f 'space embedded' 'tab\tembedded' 'newline\n embedded'\"\n \n+if test \"$test_tabs\" = y; then\n chmod u-w .\n test_expect_failure \\\n     'Test that \"git-rm -f\" fails if its rm fails' \\\n     'git-rm -f baz'\n chmod u+w .\n+fi\n \n test_expect_success \\\n     'When the rm in \"git-rm -f\" fails, it should not remove the file from the index' \\\n-- \n1.2.4.ga091\n\n\n\n"}]}