commit_file sm1 &&
head2=$(add_file sm1 foo3)
-test_expect_failure 'modified submodule(forward)' '
+test_expect_success 'modified submodule(forward)' '
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
test_cmp expected actual
'
-test_expect_failure 'modified submodule(forward)' '
+test_expect_success 'modified submodule(forward)' '
git diff --submodule=log >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
test_cmp expected actual
'
-test_expect_failure 'modified submodule(forward) --submodule' '
+test_expect_success 'modified submodule(forward) --submodule' '
git diff --submodule >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head1..$head2:
git rev-parse --short --verify HEAD
)
-test_expect_failure 'modified submodule(backward)' '
+test_expect_success 'modified submodule(backward)' '
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head2..$head3 (rewind):
'
head4=$(add_file sm1 foo4 foo5)
-test_expect_failure 'modified submodule(backward and forward)' '
+test_expect_success 'modified submodule(backward and forward)' '
git diff-index -p --submodule=log HEAD >actual &&
cat >expected <<-EOF &&
Submodule sm1 $head2...$head4:
test_cmp expected-s actual-s
'
-test_expect_failure 'alias user-defined tformat with %s (utf-8 encoding)' '
+test_expect_success 'alias user-defined tformat with %s (utf-8 encoding)' '
git log --oneline >expected-s &&
git log --pretty="tformat:%h %s" >actual-s &&
test_cmp expected-s actual-s
test_must_fail git log --pretty=test-foo
'
-test_expect_failure 'NUL separation' '
+test_expect_success 'NUL separation' '
printf "add bar\0$(commit_msg)" >expected &&
git log -z --pretty="format:%s" >actual &&
test_cmp expected actual
'
-test_expect_failure 'NUL termination' '
+test_expect_success 'NUL termination' '
printf "add bar\0$(commit_msg)\0" >expected &&
git log -z --pretty="tformat:%s" >actual &&
test_cmp expected actual
'
-test_expect_failure 'NUL separation with --stat' '
+test_expect_success 'NUL separation with --stat' '
stat0_part=$(git diff --stat HEAD^ HEAD) &&
stat1_part=$(git diff-tree --no-commit-id --stat --root HEAD^) &&
printf "add bar\n$stat0_part\n\0$(commit_msg)\n$stat1_part\n" >expected &&
head4=$(git rev-parse --verify --short HEAD~3)
'
-test_expect_failure 'left alignment formatting' "
+test_expect_success 'left alignment formatting' "
git log --pretty='format:%<(40)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'left alignment formatting at the nth column' "
+test_expect_success 'left alignment formatting at the nth column' "
git log --pretty='format:%h %<|(40)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'left alignment formatting with no padding' "
+test_expect_success 'left alignment formatting with no padding' "
git log --pretty='format:%<(1)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'left alignment formatting with trunc' "
+test_expect_success 'left alignment formatting with trunc' "
git log --pretty='format:%<(10,trunc)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'left alignment formatting with ltrunc' "
+test_expect_success 'left alignment formatting with ltrunc' "
git log --pretty='format:%<(10,ltrunc)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'left alignment formatting with mtrunc' "
+test_expect_success 'left alignment formatting with mtrunc' "
git log --pretty='format:%<(10,mtrunc)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'right alignment formatting' "
+test_expect_success 'right alignment formatting' "
git log --pretty='format:%>(40)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'right alignment formatting at the nth column' "
+test_expect_success 'right alignment formatting at the nth column' "
git log --pretty='format:%h %>|(40)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'right alignment formatting with no padding' "
+test_expect_success 'right alignment formatting with no padding' "
git log --pretty='format:%>(1)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'center alignment formatting' "
+test_expect_success 'center alignment formatting' "
git log --pretty='format:%><(40)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'center alignment formatting at the nth column' "
+test_expect_success 'center alignment formatting at the nth column' "
git log --pretty='format:%h %><|(40)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'center alignment formatting with no padding' "
+test_expect_success 'center alignment formatting with no padding' "
git log --pretty='format:%><(1)%s' >actual &&
# complete the incomplete line at the end
echo >>actual &&
test_cmp expected actual
"
-test_expect_failure 'left/right alignment formatting with stealing' "
+test_expect_success 'left/right alignment formatting with stealing' "
git commit --amend -m short --author 'long long long <long@me.com>' &&
git log --pretty='format:%<(10,trunc)%s%>>(10,ltrunc)% an' >actual &&
# complete the incomplete line at the end