author | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Mar 2009 07:41:50 +0000 (00:41 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 28 Mar 2009 07:41:50 +0000 (00:41 -0700) |
* maint-1.6.1:
test-lib: Clean up comments and Makefile.
diff --no-index: Do not generate patch output if other output is requested
test-lib: Clean up comments and Makefile.
diff --no-index: Do not generate patch output if other output is requested
diff-no-index.c | patch | blob | history | |
t/Makefile | patch | blob | history | |
t/test-lib.sh | patch | blob | history |
diff --git a/diff-no-index.c b/diff-no-index.c
index 0a14268ba952da5ff66be753cc0cc147ba64ee2b..7273a7a0b648cc8cbd6dce2043a6e544b87d28b6 100644 (file)
--- a/diff-no-index.c
+++ b/diff-no-index.c
no_index ? "--no-index" : "[--no-index]");
diff_setup(&revs->diffopt);
- if (!revs->diffopt.output_format)
- revs->diffopt.output_format = DIFF_FORMAT_PATCH;
for (i = 1; i < argc - 2; ) {
int j;
if (!strcmp(argv[i], "--no-index"))
revs->diffopt.paths = argv + argc - 2;
revs->diffopt.nr_paths = 2;
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, NO_INDEX);
diff --git a/t/Makefile b/t/Makefile
index ed49c20b16b520da1b460960dbadd5d31c4927ba..9149373032ef8e1403c820cc289728393e5b8aa8 100644 (file)
--- a/t/Makefile
+++ b/t/Makefile
$(RM) -r test-results
clean:
- $(RM) -r 'trash directory' test-results
+ $(RM) -r 'trash directory'.* test-results
aggregate-results-and-cleanup: $(T)
$(MAKE) aggregate-results
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 0c455929e4e52795e616c3e2635f5899dff665c2..59d82d25e9ad586ff43a4a9485d348492fb36d19 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
fi
case "$test_failure" in
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"
test -d "$remove_trash" &&