#!/bin/sh test_description='merge simplification' . ./test-lib.sh note () { git tag "$1" } unnote () { git name-rev --tags --stdin | sed -e "s|$_x40 (tags/\([^)]*\)) |\1 |g" } test_expect_success setup ' echo "Hi there" >file && git add file && test_tick && git commit -m "Initial file" && note A && git branch other-branch && echo "Hello" >file && git add file && test_tick && git commit -m "Modified file" && note B && git checkout other-branch && echo "Hello" >file && git add file && test_tick && git commit -m "Modified the file identically" && note C && echo "This is a stupid example" >another-file && git add another-file && test_tick && git commit -m "Add another file" && note D && test_tick && git merge -m "merge" master && note E && echo "Yet another" >elif && git add elif && test_tick && git commit -m "Irrelevant change" && note F && git checkout master && echo "Yet another" >elif && git add elif && test_tick && git commit -m "Another irrelevant change" && note G && test_tick && git merge -m "merge" other-branch && note H && echo "Final change" >file && test_tick && git commit -a -m "Final change" && note I ' FMT='tformat:%P %H | %s' check_result () { for c in $1 do echo "$c" done >expect && shift && param="$*" && test_expect_success "log $param" ' git log --pretty="$FMT" --parents $param | unnote >actual && sed -e "s/^.* \([^ ]*\) .*/\1/" >check