t7610: update branch names to match test number

Rename the testNN branches so that NN matches the test number. This should make it easier to troubleshoot test issues. Use $test_count to keep this future-proof. Signed-off-by: Richard Hansen <hansenr@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Richard Hansen committed Jan 10, 2017 at 15:41 UTC ecfdf0bd2fe4edb2835e81b09f8df26cd7d3f437
1 file changed +41 -41
t/t7610-mergetool.sh
+41 -41
@@ -94,7 +94,7 @@ test_expect_success 'setup' '
94 '
95
96 test_expect_success 'custom mergetool' '
97 - git checkout -b test1 branch1 &&
97 + git checkout -b test$test_count branch1 &&
98 git submodule update -N &&
99 test_must_fail git merge master >/dev/null 2>&1 &&
100 ( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -113,7 +113,7 @@ test_expect_success 'custom mergetool' '
113
114 test_expect_success 'mergetool crlf' '
115 test_config core.autocrlf true &&
116 - git checkout -b test2 branch1 &&
116 + git checkout -b test$test_count branch1 &&
117 test_must_fail git merge master >/dev/null 2>&1 &&
118 ( yes "" | git mergetool file1 >/dev/null 2>&1 ) &&
119 ( yes "" | git mergetool file2 >/dev/null 2>&1 ) &&
@@ -134,7 +134,7 @@ test_expect_success 'mergetool crlf' '
134 '
135
136 test_expect_success 'mergetool in subdir' '
137 - git checkout -b test3 branch1 &&
137 + git checkout -b test$test_count branch1 &&
138 git submodule update -N &&
139 (
140 cd subdir &&
@@ -161,7 +161,7 @@ test_expect_success 'mergetool on file in parent dir' '
161 '
162
163 test_expect_success 'mergetool skips autoresolved' '
164 - git checkout -b test4 branch1 &&
164 + git checkout -b test$test_count branch1 &&
165 git submodule update -N &&
166 test_must_fail git merge master &&
167 test -n "$(git ls-files -u)" &&
@@ -192,7 +192,7 @@ test_expect_success 'mergetool merges all from subdir' '
192 test_expect_success 'mergetool skips resolved paths when rerere is active' '
193 test_config rerere.enabled true &&
194 rm -rf .git/rr-cache &&
195 - git checkout -b test5 branch1 &&
195 + git checkout -b test$test_count branch1 &&
196 git submodule update -N &&
197 test_must_fail git merge master >/dev/null 2>&1 &&
198 ( yes "l" | git mergetool --no-prompt submod >/dev/null 2>&1 ) &&
@@ -233,7 +233,7 @@ test_expect_success 'conflicted stash sets up rerere' '
233 test_expect_success 'mergetool takes partial path' '
234 git reset --hard &&
235 test_config rerere.enabled false &&
236 - git checkout -b test12 branch1 &&
236 + git checkout -b test$test_count branch1 &&
237 git submodule update -N &&
238 test_must_fail git merge master &&
239
@@ -308,12 +308,12 @@ test_expect_success 'mergetool keeps tempfiles when aborting delete/delete' '
308 '
309
310 test_expect_success 'deleted vs modified submodule' '
311 - git checkout -b test6 branch1 &&
311 + git checkout -b test$test_count branch1 &&
312 git submodule update -N &&
313 mv submod submod-movedaside &&
314 git rm --cached submod &&
315 git commit -m "Submodule deleted from branch" &&
316 - git checkout -b test6.a test6 &&
316 + git checkout -b test$test_count.a test$test_count &&
317 test_must_fail git merge master &&
318 test -n "$(git ls-files -u)" &&
319 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
@@ -329,7 +329,7 @@ test_expect_success 'deleted vs modified submodule' '
329 git commit -m "Merge resolved by keeping module" &&
330
331 mv submod submod-movedaside &&
332 - git checkout -b test6.b test6 &&
332 + git checkout -b test$test_count.b test$test_count &&
333 git submodule update -N &&
334 test_must_fail git merge master &&
335 test -n "$(git ls-files -u)" &&
@@ -343,9 +343,9 @@ test_expect_success 'deleted vs modified submodule' '
343 git commit -m "Merge resolved by deleting module" &&
344
345 mv submod-movedaside submod &&
346 - git checkout -b test6.c master &&
346 + git checkout -b test$test_count.c master &&
347 git submodule update -N &&
348 - test_must_fail git merge test6 &&
348 + test_must_fail git merge test$test_count &&
349 test -n "$(git ls-files -u)" &&
350 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
351 ( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -359,9 +359,9 @@ test_expect_success 'deleted vs modified submodule' '
359 git commit -m "Merge resolved by deleting module" &&
360 mv submod.orig submod &&
361
362 - git checkout -b test6.d master &&
362 + git checkout -b test$test_count.d master &&
363 git submodule update -N &&
364 - test_must_fail git merge test6 &&
364 + test_must_fail git merge test$test_count &&
365 test -n "$(git ls-files -u)" &&
366 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
367 ( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -377,14 +377,14 @@ test_expect_success 'deleted vs modified submodule' '
377 '
378
379 test_expect_success 'file vs modified submodule' '
380 - git checkout -b test7 branch1 &&
380 + git checkout -b test$test_count branch1 &&
381 git submodule update -N &&
382 mv submod submod-movedaside &&
383 git rm --cached submod &&
384 echo not a submodule >submod &&
385 git add submod &&
386 git commit -m "Submodule path becomes file" &&
387 - git checkout -b test7.a branch1 &&
387 + git checkout -b test$test_count.a branch1 &&
388 test_must_fail git merge master &&
389 test -n "$(git ls-files -u)" &&
390 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
@@ -400,7 +400,7 @@ test_expect_success 'file vs modified submodule' '
400 git commit -m "Merge resolved by keeping module" &&
401
402 mv submod submod-movedaside &&
403 - git checkout -b test7.b test7 &&
403 + git checkout -b test$test_count.b test$test_count &&
404 test_must_fail git merge master &&
405 test -n "$(git ls-files -u)" &&
406 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
@@ -413,11 +413,11 @@ test_expect_success 'file vs modified submodule' '
413 test "$output" = "No files need merging" &&
414 git commit -m "Merge resolved by keeping file" &&
415
416 - git checkout -b test7.c master &&
416 + git checkout -b test$test_count.c master &&
417 rmdir submod && mv submod-movedaside submod &&
418 test ! -e submod.orig &&
419 git submodule update -N &&
420 - test_must_fail git merge test7 &&
420 + test_must_fail git merge test$test_count &&
421 test -n "$(git ls-files -u)" &&
422 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
423 ( yes "" | git mergetool both >/dev/null 2>&1 ) &&
@@ -430,10 +430,10 @@ test_expect_success 'file vs modified submodule' '
430 test "$output" = "No files need merging" &&
431 git commit -m "Merge resolved by keeping file" &&
432
433 - git checkout -b test7.d master &&
433 + git checkout -b test$test_count.d master &&
434 rmdir submod && mv submod.orig submod &&
435 git submodule update -N &&
436 - test_must_fail git merge test7 &&
436 + test_must_fail git merge test$test_count &&
437 test -n "$(git ls-files -u)" &&
438 ( yes "" | git mergetool file1 file2 spaced\ name subdir/file3 >/dev/null 2>&1 ) &&
439 ( yes "" | git mergetool both>/dev/null 2>&1 ) &&
@@ -448,7 +448,7 @@ test_expect_success 'file vs modified submodule' '
448 '
449
450 test_expect_success 'submodule in subdirectory' '
451 - git checkout -b test10 branch1 &&
451 + git checkout -b test$test_count branch1 &&
452 git submodule update -N &&
453 (
454 cd subdir &&
@@ -464,52 +464,52 @@ test_expect_success 'submodule in subdirectory' '
464 git add subdir/subdir_module &&
465 git commit -m "add submodule in subdirectory" &&
466
467 - git checkout -b test10.a test10 &&
467 + git checkout -b test$test_count.a test$test_count &&
468 git submodule update -N &&
469 (
470 cd subdir/subdir_module &&
471 git checkout -b super10.a &&
472 - echo test10.a >file15 &&
472 + echo test$test_count.a >file15 &&
473 git add file15 &&
474 git commit -m "on branch 10.a"
475 ) &&
476 git add subdir/subdir_module &&
477 - git commit -m "change submodule in subdirectory on test10.a" &&
477 + git commit -m "change submodule in subdirectory on test$test_count.a" &&
478
479 - git checkout -b test10.b test10 &&
479 + git checkout -b test$test_count.b test$test_count &&
480 git submodule update -N &&
481 (
482 cd subdir/subdir_module &&
483 git checkout -b super10.b &&
484 - echo test10.b >file15 &&
484 + echo test$test_count.b >file15 &&
485 git add file15 &&
486 git commit -m "on branch 10.b"
487 ) &&
488 git add subdir/subdir_module &&
489 - git commit -m "change submodule in subdirectory on test10.b" &&
489 + git commit -m "change submodule in subdirectory on test$test_count.b" &&
490
491 - test_must_fail git merge test10.a >/dev/null 2>&1 &&
491 + test_must_fail git merge test$test_count.a >/dev/null 2>&1 &&
492 (
493 cd subdir &&
494 ( yes "l" | git mergetool subdir_module )
495 ) &&
496 - test "$(cat subdir/subdir_module/file15)" = "test10.b" &&
496 + test "$(cat subdir/subdir_module/file15)" = "test$test_count.b" &&
497 git submodule update -N &&
498 - test "$(cat subdir/subdir_module/file15)" = "test10.b" &&
498 + test "$(cat subdir/subdir_module/file15)" = "test$test_count.b" &&
499 git reset --hard &&
500 git submodule update -N &&
501
502 - test_must_fail git merge test10.a >/dev/null 2>&1 &&
502 + test_must_fail git merge test$test_count.a >/dev/null 2>&1 &&
503 ( yes "r" | git mergetool subdir/subdir_module ) &&
504 - test "$(cat subdir/subdir_module/file15)" = "test10.b" &&
504 + test "$(cat subdir/subdir_module/file15)" = "test$test_count.b" &&
505 git submodule update -N &&
506 - test "$(cat subdir/subdir_module/file15)" = "test10.a" &&
506 + test "$(cat subdir/subdir_module/file15)" = "test$test_count.a" &&
507 git commit -m "branch1 resolved with mergetool" &&
508 rm -rf subdir/subdir_module
509 '
510
511 test_expect_success 'directory vs modified submodule' '
512 - git checkout -b test11 branch1 &&
512 + git checkout -b test$test_count branch1 &&
513 mv submod submod-movedaside &&
514 git rm --cached submod &&
515 mkdir submod &&
@@ -537,9 +537,9 @@ test_expect_success 'directory vs modified submodule' '
537 test "$(cat submod/bar)" = "master submodule" &&
538 git reset --hard >/dev/null 2>&1 && rm -rf submod-movedaside &&
539
540 - git checkout -b test11.c master &&
540 + git checkout -b test$test_count.c master &&
541 git submodule update -N &&
542 - test_must_fail git merge test11 &&
542 + test_must_fail git merge test$test_count &&
543 test -n "$(git ls-files -u)" &&
544 ( yes "l" | git mergetool submod ) &&
545 git submodule update -N &&
@@ -547,7 +547,7 @@ test_expect_success 'directory vs modified submodule' '
547
548 git reset --hard >/dev/null 2>&1 &&
549 git submodule update -N &&
550 - test_must_fail git merge test11 &&
550 + test_must_fail git merge test$test_count &&
551 test -n "$(git ls-files -u)" &&
552 test ! -e submod.orig &&
553 ( yes "r" | git mergetool submod ) &&
@@ -559,7 +559,7 @@ test_expect_success 'directory vs modified submodule' '
559 '
560
561 test_expect_success 'file with no base' '
562 - git checkout -b test13 branch1 &&
562 + git checkout -b test$test_count branch1 &&
563 test_must_fail git merge master &&
564 git mergetool --no-prompt --tool mybase -- both &&
565 >expected &&
@@ -568,7 +568,7 @@ test_expect_success 'file with no base' '
568 '
569
570 test_expect_success 'custom commands override built-ins' '
571 - git checkout -b test14 branch1 &&
571 + git checkout -b test$test_count branch1 &&
572 test_config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
573 test_config mergetool.defaults.trustExitCode true &&
574 test_must_fail git merge master &&
@@ -579,7 +579,7 @@ test_expect_success 'custom commands override built-ins' '
579 '
580
581 test_expect_success 'filenames seen by tools start with ./' '
582 - git checkout -b test15 branch1 &&
582 + git checkout -b test$test_count branch1 &&
583 test_config mergetool.writeToTemp false &&
584 test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
585 test_config mergetool.myecho.trustExitCode true &&
@@ -596,7 +596,7 @@ test_lazy_prereq MKTEMP '
596 '
597
598 test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToTemp' '
599 - git checkout -b test16 branch1 &&
599 + git checkout -b test$test_count branch1 &&
600 test_config mergetool.writeToTemp true &&
601 test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
602 test_config mergetool.myecho.trustExitCode true &&