Changeset 782 for git/branches/dmik/t/t4202-log.sh
- Timestamp:
- Jun 23, 2014, 9:45:51 PM (11 years ago)
- Location:
- git/branches/dmik
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
git/branches/dmik ¶
- Property svn:mergeinfo changed
/git/vendor/2.0.0 (added) merged: 777 /git/vendor/current merged: 772,774,776
- Property svn:mergeinfo changed
-
TabularUnified git/branches/dmik/t/t4202-log.sh ¶
r626 r782 73 73 EOF 74 74 75 test_expect_success 'format %w(1 2,1,2)' '76 77 git log -2 --format="%w(1 2,1,2)This is the %s commit." > actual &&75 test_expect_success 'format %w(11,1,2)' ' 76 77 git log -2 --format="%w(11,1,2)This is the %s commit." > actual && 78 78 test_cmp expect actual 79 79 ' … … 179 179 ' 180 180 181 test_expect_success 'git log --no-walk=sorted <commits> sorts by commit time' ' 182 git log --no-walk=sorted --oneline 5d31159 804a787 394ef78 > actual && 183 test_cmp expect actual 184 ' 185 181 186 cat > expect << EOF 182 187 5d31159 fourth … … 184 189 394ef78 fifth 185 190 EOF 191 test_expect_success 'git log --no-walk=unsorted <commits> leaves list of commits as given' ' 192 git log --no-walk=unsorted --oneline 5d31159 804a787 394ef78 > actual && 193 test_cmp expect actual 194 ' 195 186 196 test_expect_success 'git show <commits> leaves list of commits as given' ' 187 197 git show --oneline -s 5d31159 804a787 394ef78 > actual && … … 218 228 echo Second >expect && 219 229 git log -1 --pretty="tformat:%s" --grep=sec -i >actual && 230 test_cmp expect actual 231 ' 232 233 test_expect_success 'log -F -E --grep=<ere> uses ere' ' 234 echo second >expect && 235 git log -1 --pretty="tformat:%s" -F -E --grep=s.c.nd >actual && 220 236 test_cmp expect actual 221 237 ' … … 263 279 sed "s/ *\$//" >actual && 264 280 test_cmp expect actual 281 ' 282 283 test_expect_success 'log --raw --graph -m with merge' ' 284 git log --raw --graph --oneline -m master | head -n 500 >actual && 285 grep "initial" actual 286 ' 287 288 test_expect_success 'diff-tree --graph' ' 289 git diff-tree --graph master^ | head -n 500 >actual && 290 grep "one" actual 265 291 ' 266 292 … … 394 420 395 421 test_expect_success 'log.decorate configuration' ' 396 test_might_fail git config --unset-all log.decorate &&397 398 422 git log --oneline >expect.none && 399 423 git log --oneline --decorate >expect.short && … … 404 428 test_cmp expect.short actual && 405 429 406 git config --unset-all log.decorate && 407 git config log.decorate true && 430 test_config log.decorate true && 408 431 git log --oneline >actual && 409 432 test_cmp expect.short actual && … … 413 436 test_cmp expect.none actual && 414 437 415 git config --unset-all log.decorate && 416 git config log.decorate no && 438 test_config log.decorate no && 417 439 git log --oneline >actual && 418 440 test_cmp expect.none actual && … … 422 444 test_cmp expect.full actual && 423 445 424 git config --unset-all log.decorate && 425 git config log.decorate 1 && 446 test_config log.decorate 1 && 426 447 git log --oneline >actual && 427 448 test_cmp expect.short actual && … … 431 452 test_cmp expect.none actual && 432 453 433 git config --unset-all log.decorate && 434 git config log.decorate short && 454 test_config log.decorate short && 435 455 git log --oneline >actual && 436 456 test_cmp expect.short actual && … … 440 460 test_cmp expect.full actual && 441 461 442 git config --unset-all log.decorate && 443 git config log.decorate full && 462 test_config log.decorate full && 444 463 git log --oneline >actual && 445 464 test_cmp expect.full actual && … … 449 468 test_cmp expect.short actual 450 469 451 git config --unset-alllog.decorate &&470 test_unconfig log.decorate && 452 471 git log --pretty=raw >expect.raw && 453 gitconfig log.decorate full &&472 test_config log.decorate full && 454 473 git log --pretty=raw >actual && 455 474 test_cmp expect.raw actual … … 458 477 459 478 test_expect_success 'reflog is expected format' ' 460 test_might_fail git config --remove-section log &&461 479 git log -g --abbrev-commit --pretty=oneline >expect && 462 480 git reflog >actual && … … 471 489 472 490 test_expect_success 'log.abbrevCommit configuration' ' 473 test_when_finished "git config --unset log.abbrevCommit" &&474 475 test_might_fail git config --unset log.abbrevCommit &&476 477 491 git log --abbrev-commit >expect.log.abbrev && 478 492 git log --no-abbrev-commit >expect.log.full && … … 483 497 git whatchanged --no-abbrev-commit >expect.whatchanged.full && 484 498 485 gitconfig log.abbrevCommit true &&499 test_config log.abbrevCommit true && 486 500 487 501 git log >actual && … … 517 531 ' 518 532 533 test_expect_success 'git log -c --follow' ' 534 test_create_repo follow-c && 535 ( 536 cd follow-c && 537 test_commit initial file original && 538 git rm file && 539 test_commit rename file2 original && 540 git reset --hard initial && 541 test_commit modify file foo && 542 git merge -m merge rename && 543 git log -c --follow file2 544 ) 545 ' 546 547 cat >expect <<\EOF 548 * commit COMMIT_OBJECT_NAME 549 |\ Merge: MERGE_PARENTS 550 | | Author: A U Thor <author@example.com> 551 | | 552 | | Merge HEADS DESCRIPTION 553 | | 554 | * commit COMMIT_OBJECT_NAME 555 | | Author: A U Thor <author@example.com> 556 | | 557 | | reach 558 | | --- 559 | | reach.t | 1 + 560 | | 1 file changed, 1 insertion(+) 561 | | 562 | | diff --git a/reach.t b/reach.t 563 | | new file mode 100644 564 | | index 0000000..10c9591 565 | | --- /dev/null 566 | | +++ b/reach.t 567 | | @@ -0,0 +1 @@ 568 | | +reach 569 | | 570 | \ 571 *-. \ commit COMMIT_OBJECT_NAME 572 |\ \ \ Merge: MERGE_PARENTS 573 | | | | Author: A U Thor <author@example.com> 574 | | | | 575 | | | | Merge HEADS DESCRIPTION 576 | | | | 577 | | * | commit COMMIT_OBJECT_NAME 578 | | |/ Author: A U Thor <author@example.com> 579 | | | 580 | | | octopus-b 581 | | | --- 582 | | | octopus-b.t | 1 + 583 | | | 1 file changed, 1 insertion(+) 584 | | | 585 | | | diff --git a/octopus-b.t b/octopus-b.t 586 | | | new file mode 100644 587 | | | index 0000000..d5fcad0 588 | | | --- /dev/null 589 | | | +++ b/octopus-b.t 590 | | | @@ -0,0 +1 @@ 591 | | | +octopus-b 592 | | | 593 | * | commit COMMIT_OBJECT_NAME 594 | |/ Author: A U Thor <author@example.com> 595 | | 596 | | octopus-a 597 | | --- 598 | | octopus-a.t | 1 + 599 | | 1 file changed, 1 insertion(+) 600 | | 601 | | diff --git a/octopus-a.t b/octopus-a.t 602 | | new file mode 100644 603 | | index 0000000..11ee015 604 | | --- /dev/null 605 | | +++ b/octopus-a.t 606 | | @@ -0,0 +1 @@ 607 | | +octopus-a 608 | | 609 * | commit COMMIT_OBJECT_NAME 610 |/ Author: A U Thor <author@example.com> 611 | 612 | seventh 613 | --- 614 | seventh.t | 1 + 615 | 1 file changed, 1 insertion(+) 616 | 617 | diff --git a/seventh.t b/seventh.t 618 | new file mode 100644 619 | index 0000000..9744ffc 620 | --- /dev/null 621 | +++ b/seventh.t 622 | @@ -0,0 +1 @@ 623 | +seventh 624 | 625 * commit COMMIT_OBJECT_NAME 626 |\ Merge: MERGE_PARENTS 627 | | Author: A U Thor <author@example.com> 628 | | 629 | | Merge branch 'tangle' 630 | | 631 | * commit COMMIT_OBJECT_NAME 632 | |\ Merge: MERGE_PARENTS 633 | | | Author: A U Thor <author@example.com> 634 | | | 635 | | | Merge branch 'side' (early part) into tangle 636 | | | 637 | * | commit COMMIT_OBJECT_NAME 638 | |\ \ Merge: MERGE_PARENTS 639 | | | | Author: A U Thor <author@example.com> 640 | | | | 641 | | | | Merge branch 'master' (early part) into tangle 642 | | | | 643 | * | | commit COMMIT_OBJECT_NAME 644 | | | | Author: A U Thor <author@example.com> 645 | | | | 646 | | | | tangle-a 647 | | | | --- 648 | | | | tangle-a | 1 + 649 | | | | 1 file changed, 1 insertion(+) 650 | | | | 651 | | | | diff --git a/tangle-a b/tangle-a 652 | | | | new file mode 100644 653 | | | | index 0000000..7898192 654 | | | | --- /dev/null 655 | | | | +++ b/tangle-a 656 | | | | @@ -0,0 +1 @@ 657 | | | | +a 658 | | | | 659 * | | | commit COMMIT_OBJECT_NAME 660 |\ \ \ \ Merge: MERGE_PARENTS 661 | | | | | Author: A U Thor <author@example.com> 662 | | | | | 663 | | | | | Merge branch 'side' 664 | | | | | 665 | * | | | commit COMMIT_OBJECT_NAME 666 | | |_|/ Author: A U Thor <author@example.com> 667 | |/| | 668 | | | | side-2 669 | | | | --- 670 | | | | 2 | 1 + 671 | | | | 1 file changed, 1 insertion(+) 672 | | | | 673 | | | | diff --git a/2 b/2 674 | | | | new file mode 100644 675 | | | | index 0000000..0cfbf08 676 | | | | --- /dev/null 677 | | | | +++ b/2 678 | | | | @@ -0,0 +1 @@ 679 | | | | +2 680 | | | | 681 | * | | commit COMMIT_OBJECT_NAME 682 | | | | Author: A U Thor <author@example.com> 683 | | | | 684 | | | | side-1 685 | | | | --- 686 | | | | 1 | 1 + 687 | | | | 1 file changed, 1 insertion(+) 688 | | | | 689 | | | | diff --git a/1 b/1 690 | | | | new file mode 100644 691 | | | | index 0000000..d00491f 692 | | | | --- /dev/null 693 | | | | +++ b/1 694 | | | | @@ -0,0 +1 @@ 695 | | | | +1 696 | | | | 697 * | | | commit COMMIT_OBJECT_NAME 698 | | | | Author: A U Thor <author@example.com> 699 | | | | 700 | | | | Second 701 | | | | --- 702 | | | | one | 1 + 703 | | | | 1 file changed, 1 insertion(+) 704 | | | | 705 | | | | diff --git a/one b/one 706 | | | | new file mode 100644 707 | | | | index 0000000..9a33383 708 | | | | --- /dev/null 709 | | | | +++ b/one 710 | | | | @@ -0,0 +1 @@ 711 | | | | +case 712 | | | | 713 * | | | commit COMMIT_OBJECT_NAME 714 | |_|/ Author: A U Thor <author@example.com> 715 |/| | 716 | | | sixth 717 | | | --- 718 | | | a/two | 1 - 719 | | | 1 file changed, 1 deletion(-) 720 | | | 721 | | | diff --git a/a/two b/a/two 722 | | | deleted file mode 100644 723 | | | index 9245af5..0000000 724 | | | --- a/a/two 725 | | | +++ /dev/null 726 | | | @@ -1 +0,0 @@ 727 | | | -ni 728 | | | 729 * | | commit COMMIT_OBJECT_NAME 730 | | | Author: A U Thor <author@example.com> 731 | | | 732 | | | fifth 733 | | | --- 734 | | | a/two | 1 + 735 | | | 1 file changed, 1 insertion(+) 736 | | | 737 | | | diff --git a/a/two b/a/two 738 | | | new file mode 100644 739 | | | index 0000000..9245af5 740 | | | --- /dev/null 741 | | | +++ b/a/two 742 | | | @@ -0,0 +1 @@ 743 | | | +ni 744 | | | 745 * | | commit COMMIT_OBJECT_NAME 746 |/ / Author: A U Thor <author@example.com> 747 | | 748 | | fourth 749 | | --- 750 | | ein | 1 + 751 | | 1 file changed, 1 insertion(+) 752 | | 753 | | diff --git a/ein b/ein 754 | | new file mode 100644 755 | | index 0000000..9d7e69f 756 | | --- /dev/null 757 | | +++ b/ein 758 | | @@ -0,0 +1 @@ 759 | | +ichi 760 | | 761 * | commit COMMIT_OBJECT_NAME 762 |/ Author: A U Thor <author@example.com> 763 | 764 | third 765 | --- 766 | ichi | 1 + 767 | one | 1 - 768 | 2 files changed, 1 insertion(+), 1 deletion(-) 769 | 770 | diff --git a/ichi b/ichi 771 | new file mode 100644 772 | index 0000000..9d7e69f 773 | --- /dev/null 774 | +++ b/ichi 775 | @@ -0,0 +1 @@ 776 | +ichi 777 | diff --git a/one b/one 778 | deleted file mode 100644 779 | index 9d7e69f..0000000 780 | --- a/one 781 | +++ /dev/null 782 | @@ -1 +0,0 @@ 783 | -ichi 784 | 785 * commit COMMIT_OBJECT_NAME 786 | Author: A U Thor <author@example.com> 787 | 788 | second 789 | --- 790 | one | 2 +- 791 | 1 file changed, 1 insertion(+), 1 deletion(-) 792 | 793 | diff --git a/one b/one 794 | index 5626abf..9d7e69f 100644 795 | --- a/one 796 | +++ b/one 797 | @@ -1 +1 @@ 798 | -one 799 | +ichi 800 | 801 * commit COMMIT_OBJECT_NAME 802 Author: A U Thor <author@example.com> 803 804 initial 805 --- 806 one | 1 + 807 1 file changed, 1 insertion(+) 808 809 diff --git a/one b/one 810 new file mode 100644 811 index 0000000..5626abf 812 --- /dev/null 813 +++ b/one 814 @@ -0,0 +1 @@ 815 +one 816 EOF 817 818 sanitize_output () { 819 sed -e 's/ *$//' \ 820 -e 's/commit [0-9a-f]*$/commit COMMIT_OBJECT_NAME/' \ 821 -e 's/Merge: [ 0-9a-f]*$/Merge: MERGE_PARENTS/' \ 822 -e 's/Merge tag.*/Merge HEADS DESCRIPTION/' \ 823 -e 's/Merge commit.*/Merge HEADS DESCRIPTION/' \ 824 -e 's/, 0 deletions(-)//' \ 825 -e 's/, 0 insertions(+)//' \ 826 -e 's/ 1 files changed, / 1 file changed, /' \ 827 -e 's/, 1 deletions(-)/, 1 deletion(-)/' \ 828 -e 's/, 1 insertions(+)/, 1 insertion(+)/' 829 } 830 831 test_expect_success 'log --graph with diff and stats' ' 832 git log --graph --pretty=short --stat -p >actual && 833 sanitize_output >actual.sanitized <actual && 834 test_i18ncmp expect actual.sanitized 835 ' 836 837 test_expect_success 'dotdot is a parent directory' ' 838 mkdir -p a/b && 839 ( echo sixth && echo fifth ) >expect && 840 ( cd a/b && git log --format=%s .. ) >actual && 841 test_cmp expect actual 842 ' 843 519 844 test_done
Note:
See TracChangeset
for help on using the changeset viewer.