git add negative &&
git status -v | sed -ne "/^diff --git /p" >actual &&
echo "diff --git a/negative b/negative" >expect &&
- diff -u expect actual
+ test_cmp expect actual
'
{ echo;echo "# text";echo; } >expect &&
git commit --cleanup=verbatim -t expect -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d" |head -n 3 >actual &&
- diff -u expect actual
+ test_cmp expect actual
'
echo >>negative &&
git commit --cleanup=verbatim -F expect -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
- diff -u expect actual
+ test_cmp expect actual
'
echo >>negative &&
git commit --cleanup=verbatim -m "$(cat expect)" -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
- diff -u expect actual
+ test_cmp expect actual
'
echo "# text" >expect &&
git commit --cleanup=whitespace -F text -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
- diff -u expect actual
+ test_cmp expect actual
'
echo sample >expect &&
git commit --cleanup=strip -F text -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
- diff -u expect actual
+ test_cmp expect actual
'
{ echo;echo sample;echo; } >text &&
git commit -e -F text -a &&
head -n 4 .git/COMMIT_EDITMSG >actual &&
- diff -u expect actual
+ test_cmp expect actual
'