3 # Copyright (c) 2006 Carl D. Worth
6 test_description='Test of git-add, including the -- option.'
12 'touch foo && git-add foo'
15 'Post-check that foo is in the index' \
16 'git-ls-files foo | grep foo'
19 'Test that "git-add -- -q" works' \
20 'touch -- -q && git-add -- -q'
23 'git-add: Test that executable bit is not used if core.filemode=0' \
24 'git repo-config core.filemode 0 &&
28 case "`git-ls-files --stage xfoo1`" in
29 100644" "*xfoo1) echo ok;;
30 *) echo fail; git-ls-files --stage xfoo1; (exit 1);;
34 'git-update-index --add: Test that executable bit is not used...' \
35 'git repo-config core.filemode 0 &&
38 git-update-index --add xfoo2 &&
39 case "`git-ls-files --stage xfoo2`" in
40 100644" "*xfoo2) echo ok;;
41 *) echo fail; git-ls-files --stage xfoo2; (exit 1);;
45 'git-update-index --add: Test that executable bit is not used...' \
46 'git repo-config core.filemode 0 &&
48 git-update-index --add xfoo3 &&
49 case "`git-ls-files --stage xfoo3`" in
50 120000" "*xfoo3) echo ok;;
51 *) echo fail; git-ls-files --stage xfoo3; (exit 1);;