if (!origin)
return;
- diff_setup(&opts);
- opts.output_format |= DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT;
+ memcpy(&opts, &rev->diffopt, sizeof(opts));
+ opts.output_format = DIFF_FORMAT_SUMMARY | DIFF_FORMAT_DIFFSTAT;
diff_setup_done(&opts);
for i in patches/0002-* patches/0003-*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
for i in patches/*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
for i in patches/0001-* patches/0002-* patches/0003-*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
for i in patches/*
do
grep "References: $FIRST_MID" $i &&
- grep "In-Reply-To: $FIRST_MID" $i
+ grep "In-Reply-To: $FIRST_MID" $i || break
done
'
ls patches/0004-This-is-an-excessively-long-subject-line-for-a-messa.patch
'
+test_expect_success 'cover-letter inherits diff options' '
+
+ git mv file foo &&
+ git commit -m foo &&
+ git format-patch --cover-letter -1 &&
+ ! grep "file => foo .* 0 *$" 0000-cover-letter.patch &&
+ git format-patch --cover-letter -1 -M &&
+ grep "file => foo .* 0 *$" 0000-cover-letter.patch
+
+'
test_done