Skip to content

Commit 9d51564

Browse files
committed
Merge branch 'maint-1.6.1' into maint
* maint-1.6.1: test-lib: Clean up comments and Makefile. diff --no-index: Do not generate patch output if other output is requested
2 parents a8fac79 + 81db4ab commit 9d51564

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

diff-no-index.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ void diff_no_index(struct rev_info *revs,
201201
no_index ? "--no-index" : "[--no-index]");
202202

203203
diff_setup(&revs->diffopt);
204-
if (!revs->diffopt.output_format)
205-
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
206204
for (i = 1; i < argc - 2; ) {
207205
int j;
208206
if (!strcmp(argv[i], "--no-index"))
@@ -248,6 +246,8 @@ void diff_no_index(struct rev_info *revs,
248246
revs->diffopt.paths = argv + argc - 2;
249247
revs->diffopt.nr_paths = 2;
250248
revs->diffopt.skip_stat_unmatch = 1;
249+
if (!revs->diffopt.output_format)
250+
revs->diffopt.output_format = DIFF_FORMAT_PATCH;
251251

252252
DIFF_OPT_SET(&revs->diffopt, EXIT_WITH_STATUS);
253253
DIFF_OPT_SET(&revs->diffopt, NO_INDEX);

t/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pre-clean:
2424
$(RM) -r test-results
2525

2626
clean:
27-
$(RM) -r 'trash directory' test-results
27+
$(RM) -r 'trash directory'.* test-results
2828

2929
aggregate-results-and-cleanup: $(T)
3030
$(MAKE) aggregate-results

t/test-lib.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,14 +466,6 @@ test_done () {
466466
fi
467467
case "$test_failure" in
468468
0)
469-
# We could:
470-
# cd .. && rm -fr 'trash directory'
471-
# but that means we forbid any tests that use their own
472-
# subdirectory from calling test_done without coming back
473-
# to where they started from.
474-
# The Makefile provided will clean this test area so
475-
# we will leave things as they are.
476-
477469
say_color pass "passed all $msg"
478470

479471
test -d "$remove_trash" &&

0 commit comments

Comments
 (0)