Merge branch 'maint'
* maint: test-lib: Clean up comments and Makefile. diff --no-index: Do not generate patch output if other output is requestedmaint
commit
b0085a7167
|
@ -205,8 +205,6 @@ void diff_no_index(struct rev_info *revs,
|
||||||
no_index ? "--no-index" : "[--no-index]");
|
no_index ? "--no-index" : "[--no-index]");
|
||||||
|
|
||||||
diff_setup(&revs->diffopt);
|
diff_setup(&revs->diffopt);
|
||||||
if (!revs->diffopt.output_format)
|
|
||||||
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
|
|
||||||
for (i = 1; i < argc - 2; ) {
|
for (i = 1; i < argc - 2; ) {
|
||||||
int j;
|
int j;
|
||||||
if (!strcmp(argv[i], "--no-index"))
|
if (!strcmp(argv[i], "--no-index"))
|
||||||
|
@ -252,6 +250,8 @@ void diff_no_index(struct rev_info *revs,
|
||||||
revs->diffopt.paths = argv + argc - 2;
|
revs->diffopt.paths = argv + argc - 2;
|
||||||
revs->diffopt.nr_paths = 2;
|
revs->diffopt.nr_paths = 2;
|
||||||
revs->diffopt.skip_stat_unmatch = 1;
|
revs->diffopt.skip_stat_unmatch = 1;
|
||||||
|
if (!revs->diffopt.output_format)
|
||||||
|
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||||
|
|
||||||
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
|
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
|
||||||
DIFF_OPT_SET(&revs->diffopt, NO_INDEX);
|
DIFF_OPT_SET(&revs->diffopt, NO_INDEX);
|
||||||
|
|
|
@ -24,7 +24,7 @@ pre-clean:
|
||||||
$(RM) -r test-results
|
$(RM) -r test-results
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -r 'trash directory' test-results
|
$(RM) -r 'trash directory'.* test-results
|
||||||
|
|
||||||
aggregate-results-and-cleanup: $(T)
|
aggregate-results-and-cleanup: $(T)
|
||||||
$(MAKE) aggregate-results
|
$(MAKE) aggregate-results
|
||||||
|
|
|
@ -523,14 +523,6 @@ test_done () {
|
||||||
fi
|
fi
|
||||||
case "$test_failure" in
|
case "$test_failure" in
|
||||||
0)
|
0)
|
||||||
# We could:
|
|
||||||
# cd .. && rm -fr 'trash directory'
|
|
||||||
# but that means we forbid any tests that use their own
|
|
||||||
# subdirectory from calling test_done without coming back
|
|
||||||
# to where they started from.
|
|
||||||
# The Makefile provided will clean this test area so
|
|
||||||
# we will leave things as they are.
|
|
||||||
|
|
||||||
say_color pass "passed all $msg"
|
say_color pass "passed all $msg"
|
||||||
|
|
||||||
test -d "$remove_trash" &&
|
test -d "$remove_trash" &&
|
||||||
|
|
Loading…
Reference in New Issue