echo >foo && echo >bar && echo >baz &&
git add foo bar baz && H=$(git rev-parse :foo) && git rm -f foo &&
echo "100644 $H 3 foo" | git update-index --index-info &&
- test-chmtime -60 bar baz &&
+ test-tool chmtime -60 bar baz &&
>expect &&
git add --refresh bar >actual &&
test_cmp expect actual &&
test_i18ncmp expect.err actual.err
'
+test_expect_success 'git add empty string should fail' '
+ test_must_fail git add ""
+'
+
test_expect_success 'git add --chmod=[+-]x stages correctly' '
rm -f foo1 &&
echo foo >foo1 &&
test_expect_success 'git add --chmod=[+-]x changes index with already added file' '
rm -f foo3 xfoo3 &&
+ git reset --hard &&
echo foo >foo3 &&
git add foo3 &&
git add --chmod=+x foo3 &&