Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t4131-apply-fake-ancestor.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t4131-apply-fake-ancestor.sh` 42 lines ยท 840 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2009 Stephen Boyd 4 # 5 6 test_description='git apply --build-fake-ancestor handling.' 7 8 . ./test-lib.sh 9 10 test_expect_success 'setup' ' 11 test_commit 1 && 12 test_commit 2 && 13 mkdir sub && 14 test_commit 3 sub/3.t && 15 test_commit 4 16 ' 17 18 test_expect_success 'apply --build-fake-ancestor' ' 19 git checkout 2 && 20 echo "A" > 1.t && 21 git diff > 1.patch && 22 git reset --hard && 23 git checkout 1 && 24 git apply --build-fake-ancestor 1.ancestor 1.patch 25 ' 26 27 test_expect_success 'apply --build-fake-ancestor in a subdirectory' ' 28 git checkout 3 && 29 echo "C" > sub/3.t && 30 git diff > 3.patch && 31 git reset --hard && 32 git checkout 4 && 33 ( 34 cd sub && 35 git apply --build-fake-ancestor 3.ancestor ../3.patch && 36 test -f 3.ancestor 37 ) && 38 git apply --build-fake-ancestor 3.ancestor 3.patch && 39 test_cmp sub/3.ancestor 3.ancestor 40 ' 41 42 test_done