No subject
Thu Jun 12 23:09:36 BST 2008
Merging HEAD with d35a2689373db7d3e8fd3bbd8a8500646b8abfc5
Merging:
b1c2d0a addition
d35a268 update
found 1 common ancestor(s):
687fc7a initial
Merge made by recursive.
file3 | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file3
* ok 14: pulling changes from origin
* expecting success: cd D &&
echo "5 objects" > expected &&
git count-objects | cut -d, -f1 > current &&
diff expected current
* ok 15: check objects expected to exist locally
* passed all 15 test(s)
*** t5701-clone-local.sh ***
* expecting success:
: >file && git add . && git commit -m1 &&
git clone --bare . a.git &&
git clone --bare . x &&
test "$(GIT_CONFIG=a.git/config git config --bool core.bare)" = true &&
test "$(GIT_CONFIG=x/config git config --bool core.bare)" = true
Created initial commit 7166623: 1
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/a.git/
0 blocks
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/x/
0 blocks
* ok 1: preparing origin repository
* expecting success:
cd "$D" &&
git clone -l -s a b &&
cd b &&
test "$(GIT_CONFIG=.git/config git config --bool core.bare)" = false &&
git fetch
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/b/.git/
* ok 2: local clone without .git suffix
* expecting success:
cd "$D" &&
git clone -l -s a.git c &&
cd c &&
git fetch
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/c/.git/
* ok 3: local clone with .git suffix
* expecting success:
cd "$D" &&
git clone -l -s x y &&
cd y &&
git fetch
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/y/.git/
* ok 4: local clone from x
* expecting success:
cd "$D" &&
if git clone -l -s x.git z
then
echo "Oops, should have failed"
false
else
echo happy
fi
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/z/.git/
fatal: 'x.git': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
fetch-pack from 'x.git' failed.
happy
* ok 5: local clone from x.git that does not exist
* expecting success:
cd "$D" &&
git clone --bare --no-hardlinks x w &&
cd w &&
linked=$(find objects -type f ! -links 1 | wc -l) &&
test 0 = $linked
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/w/
1 block
* ok 6: With -no-hardlinks, local will make a copy
* expecting success:
cd "$D" &&
rm -fr w &&
git clone -l --bare x w &&
cd w &&
copied=$(find objects -type f -links 1 | wc -l) &&
test 0 = $copied
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/w/
0 blocks
* ok 7: Even without -l, local will make a hardlink
* expecting success:
cd "$D" &&
echo "ref: refs/heads/nonexistent" > a.git/HEAD &&
git clone a d &&
cd d &&
git fetch &&
test ! -e .git/refs/remotes/origin/HEAD
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/d/.git/
0 blocks
Warning: Remote HEAD refers to nonexistent ref, unable to checkout.
* ok 8: local clone of repo with nonexistent ref in HEAD
* passed all 8 test(s)
*** t5702-clone-options.sh ***
* expecting success:
mkdir parent &&
(cd parent && git init &&
echo one >file && git add file &&
git commit -m one)
Initialized empty Git repository in .git/
Created initial commit b7eabb4: one
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 1: setup
* expecting success:
git clone -o foo parent clone-o &&
(cd clone-o && git rev-parse --verify refs/remotes/foo/master)
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/clone-o/.git/
0 blocks
b7eabb4bf0d4203f309d5cbcd0df0e2c695f7cd9
* ok 2: clone -o
* passed all 2 test(s)
*** t5710-info-alternate.sh ***
* expecting success: test_create_repo A && cd A &&
echo "Hello World" > file1 &&
git add file1 &&
git commit -m "Initial commit" file1 &&
git repack -a -d &&
git prune
Created initial commit 31101e3: Initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file1
* ok 1: preparing first repository
* expecting success: git clone -l -s A B && cd B &&
echo "foo bar" > file2 &&
git add file2 &&
git commit -m "next commit" file2 &&
git repack -a -d -l &&
git prune
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/B/.git/
Created commit 4116363: next commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file2
* ok 2: preparing second repository
* expecting success: git clone -l -s B C && cd C &&
echo "Goodbye, cruel world" > file3 &&
git add file3 &&
git commit -m "one more" file3 &&
git repack -a -d -l &&
git prune
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/C/.git/
Created commit 33d9272: one more
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file3
* ok 3: preparing third repository
* expecting success: git clone -l -s C D &&
git clone -l -s D E &&
git clone -l -s E F &&
git clone -l -s F G &&
git clone -l -s G H
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/D/.git/
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/E/.git/
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/F/.git/
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/G/.git/
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/H/.git/
error: /build/buildd/git-core-1.5.4.3/t/trash/B/.git/objects: ignoring alternate object stores, nesting too deep.
error: /build/buildd/git-core-1.5.4.3/t/trash/B/.git/objects: ignoring alternate object stores, nesting too deep.
error: /build/buildd/git-core-1.5.4.3/t/trash/B/.git/objects: ignoring alternate object stores, nesting too deep.
error: /build/buildd/git-core-1.5.4.3/t/trash/B/.git/objects: ignoring alternate object stores, nesting too deep.
error: git-checkout-index: unable to read sha1 file of file1 (557db03de997c86a4a028e1ebd3a1ceb225be238)
* ok 4: creating too deep nesting
* expecting success: cd H && {
test_valid_repo
test $? -ne 0
}
error: /build/buildd/git-core-1.5.4.3/t/trash/B/.git/objects: ignoring alternate object stores, nesting too deep.
* ok 5: invalidity of deepest repository
* expecting success: cd C &&
test_valid_repo
* ok 6: validity of third repository
* expecting success: cd D &&
test_valid_repo
* ok 7: validity of fourth repository
* expecting success: echo '/build/buildd/git-core-1.5.4.3/t/trash/B/.git/objects' >> '/build/buildd/git-core-1.5.4.3/t/trash'/A/.git/objects/info/alternates&&
cd C &&
test_valid_repo
* ok 8: breaking of loops
* expecting failure: cd C &&
rm .git/objects/info/alternates &&
test_valid_repo
error: refs/remotes/origin/HEAD does not point to a valid object!
error: refs/remotes/origin/master does not point to a valid object!
* ok 9: that info/alternates is necessary
* expecting success: cd C &&
echo "../../../B/.git/objects" > .git/objects/info/alternates &&
test_valid_repo
* ok 10: that relative alternate is possible for current dir
* expecting failure: cd D &&
test_valid_repo
error: /build/buildd/git-core-1.5.4.3/t/trash/C/.git/objects: ignoring relative alternate object store ../../../B/.git/objects
* ok 11: that relative alternate is only possible for current dir
* passed all 11 test(s)
*** t6001-rev-list-graft.sh ***
* expecting success:
mkdir subdir &&
echo >fileA fileA &&
echo >subdir/fileB fileB &&
git add fileA subdir/fileB &&
git commit -a -m "Initial in one history." &&
A0=`git rev-parse --verify HEAD` &&
echo >fileA fileA modified &&
git commit -a -m "Second in one history." &&
A1=`git rev-parse --verify HEAD` &&
echo >subdir/fileB fileB modified &&
git commit -a -m "Third in one history." &&
A2=`git rev-parse --verify HEAD` &&
rm -f .git/refs/heads/master .git/index &&
echo >fileA fileA again &&
echo >subdir/fileB fileB again &&
git add fileA subdir/fileB &&
git commit -a -m "Initial in alternate history." &&
B0=`git rev-parse --verify HEAD` &&
echo >fileA fileA modified in alternate history &&
git commit -a -m "Second in alternate history." &&
B1=`git rev-parse --verify HEAD` &&
echo >subdir/fileB fileB modified in alternate history &&
git commit -a -m "Third in alternate history." &&
B2=`git rev-parse --verify HEAD` &&
: done
Created initial commit 7e147dd: Initial in one history.
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 fileA
create mode 100644 subdir/fileB
Created commit 0bbbf5c: Second in one history.
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 16503ea: Third in one history.
1 files changed, 1 insertions(+), 1 deletions(-)
Created initial commit ca9afdf: Initial in alternate history.
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 fileA
create mode 100644 subdir/fileB
Created commit fd60944: Second in alternate history.
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 5604eb3: Third in alternate history.
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 1: setup
* expecting success:
rm -f .git/info/grafts
check basic 5604eb3306642bdcb1ce6751027b683296cc93e7 -- 5604eb3306642bdcb1ce6751027b683296cc93e7 fd609443036b3729ce43a222fdc227d1072caccf ca9afdf29ae64640042a19a54fd46eeaa9031d73
* ok 2: without grafts
* expecting success:
echo 'ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674' >.git/info/grafts
check basic 5604eb3306642bdcb1ce6751027b683296cc93e7 -- 5604eb3306642bdcb1ce6751027b683296cc93e7 fd609443036b3729ce43a222fdc227d1072caccf ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674 0bbbf5c5db953ec5a806e86213f3f821d2d8b94d 7e147ddb93707410bbf52618383e800ef6c13fd3
* ok 3: with grafts
* expecting success:
rm -f .git/info/grafts
check basic 5604eb3306642bdcb1ce6751027b683296cc93e7 subdir -- 5604eb3306642bdcb1ce6751027b683296cc93e7 ca9afdf29ae64640042a19a54fd46eeaa9031d73
* ok 4: without grafts, with pathlimit
* expecting success:
echo 'ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674' >.git/info/grafts
check basic 5604eb3306642bdcb1ce6751027b683296cc93e7 subdir -- 5604eb3306642bdcb1ce6751027b683296cc93e7 ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674 7e147ddb93707410bbf52618383e800ef6c13fd3
* ok 5: with grafts, with pathlimit
* expecting success:
rm -f .git/info/grafts
check parents 5604eb3306642bdcb1ce6751027b683296cc93e7 -- 5604eb3306642bdcb1ce6751027b683296cc93e7 fd609443036b3729ce43a222fdc227d1072caccf ca9afdf29ae64640042a19a54fd46eeaa9031d73
* ok 6: without grafts
* expecting success:
echo 'ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674' >.git/info/grafts
check parents 5604eb3306642bdcb1ce6751027b683296cc93e7 -- 5604eb3306642bdcb1ce6751027b683296cc93e7 fd609443036b3729ce43a222fdc227d1072caccf ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674 0bbbf5c5db953ec5a806e86213f3f821d2d8b94d 7e147ddb93707410bbf52618383e800ef6c13fd3
* ok 7: with grafts
* expecting success:
rm -f .git/info/grafts
check parents 5604eb3306642bdcb1ce6751027b683296cc93e7 subdir -- 5604eb3306642bdcb1ce6751027b683296cc93e7 ca9afdf29ae64640042a19a54fd46eeaa9031d73
* ok 8: without grafts, with pathlimit
* expecting success:
echo 'ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674' >.git/info/grafts
check parents 5604eb3306642bdcb1ce6751027b683296cc93e7 subdir -- 5604eb3306642bdcb1ce6751027b683296cc93e7 ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674 7e147ddb93707410bbf52618383e800ef6c13fd3
* ok 9: with grafts, with pathlimit
* expecting success:
rm -f .git/info/grafts
check parents-raw 5604eb3306642bdcb1ce6751027b683296cc93e7 -- 5604eb3306642bdcb1ce6751027b683296cc93e7 fd609443036b3729ce43a222fdc227d1072caccf ca9afdf29ae64640042a19a54fd46eeaa9031d73
* ok 10: without grafts
* expecting success:
echo 'ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674' >.git/info/grafts
check parents-raw 5604eb3306642bdcb1ce6751027b683296cc93e7 -- 5604eb3306642bdcb1ce6751027b683296cc93e7 fd609443036b3729ce43a222fdc227d1072caccf ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674 0bbbf5c5db953ec5a806e86213f3f821d2d8b94d 7e147ddb93707410bbf52618383e800ef6c13fd3
* ok 11: with grafts
* expecting success:
rm -f .git/info/grafts
check parents-raw 5604eb3306642bdcb1ce6751027b683296cc93e7 subdir -- 5604eb3306642bdcb1ce6751027b683296cc93e7 ca9afdf29ae64640042a19a54fd46eeaa9031d73
* ok 12: without grafts, with pathlimit
* expecting success:
echo 'ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674' >.git/info/grafts
check parents-raw 5604eb3306642bdcb1ce6751027b683296cc93e7 subdir -- 5604eb3306642bdcb1ce6751027b683296cc93e7 ca9afdf29ae64640042a19a54fd46eeaa9031d73 16503ea04b9238016e07d6be8533a0ea215cf674 7e147ddb93707410bbf52618383e800ef6c13fd3
* ok 13: with grafts, with pathlimit
* passed all 13 test(s)
*** t6002-rev-list-bisect.sh ***
* expecting success: test $_bisect_err -le $_max_diff
* ok 1: bisection diff --bisect l0 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 2: bisection diff --bisect l1 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 3: bisection diff --bisect l2 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 4: bisection diff --bisect a0 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 5: bisection diff --bisect a1 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 6: bisection diff --bisect a2 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 7: bisection diff --bisect a3 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 8: bisection diff --bisect b1 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 9: bisection diff --bisect b2 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 10: bisection diff --bisect b3 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 11: bisection diff --bisect c1 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 12: bisection diff --bisect c2 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 13: bisection diff --bisect c3 ^root <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 14: bisection diff --bisect E ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 15: bisection diff --bisect e1 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 16: bisection diff --bisect e2 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 17: bisection diff --bisect e3 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 18: bisection diff --bisect e4 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 19: bisection diff --bisect e5 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 20: bisection diff --bisect e6 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 21: bisection diff --bisect e7 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 22: bisection diff --bisect f1 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 23: bisection diff --bisect f2 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 24: bisection diff --bisect f3 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 25: bisection diff --bisect f4 ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 26: bisection diff --bisect E ^F <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 27: bisection diff --bisect V ^U <= 1
* expecting success: test $_bisect_err -le $_max_diff
* ok 28: bisection diff --bisect V ^U ^u1 ^u2 ^u3 <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 29: bisection diff --bisect u1 ^U <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 30: bisection diff --bisect u2 ^U <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 31: bisection diff --bisect u3 ^U <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 32: bisection diff --bisect u4 ^U <= 0
* expecting success: test $_bisect_err -le $_max_diff
* ok 33: bisection diff --bisect u5 ^U <= 0
* expecting success: check_output bisect-l5-root "git rev-list $_bisect_option l5 ^root"
* ok 34: --bisect l5 ^root
* expecting success: check_output bisect-l5-root-c3 "git rev-list $_bisect_option l5 ^root ^c3"
* ok 35: --bisect l5 ^root ^c3
* expecting success: check_output bisect-l5-root-c3-b4 "git rev-list $_bisect_option l5 ^c3 ^b4"
* ok 36: --bisect l5 ^root ^c3 ^b4
* expecting success: check_output bisect-l3-root-c3-b4 "git rev-list $_bisect_option l3 ^root ^c3 ^b4"
* ok 37: --bisect l3 ^root ^c3 ^b4
* expecting success: check_output bisect-l5-b3-a3-b4-a4 "git rev-list $_bisect_option l3 ^b3 ^a3 ^a4"
* ok 38: --bisect l5 ^b3 ^a3 ^b4 ^a4
* expecting success: check_output bisect-l4-a2-a3-b-a4 "git rev-list $_bisect_option l4 ^a2 ^a3 ^a4"
* ok 39: --bisect l4 ^a2 ^a3 ^b ^a4
* expecting success: check_output bisect-l3-a2-a3-b-a4 "git rev-list $_bisect_option l3 ^a2 ^a3 ^a4"
* ok 40: --bisect l3 ^a2 ^a3 ^b ^a4
* expecting success: check_output bisect-a4-a2-a3-b4 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4"
* ok 41: --bisect a4 ^a2 ^a3 ^b4
* expecting success: check_output bisect-a4-a2-a3-b4-c2 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2"
* ok 42: --bisect a4 ^a2 ^a3 ^b4 ^c2
* expecting success: check_output bisect-a4-a2-a3-b4-c2-c3 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2 ^c3"
* ok 43: --bisect a4 ^a2 ^a3 ^b4 ^c2 ^c3
* expecting success: check_output bisect-a4-a2-a3-b4 "git rev-list $_bisect_option a4 ^a2 ^a3 ^b4"
* ok 44: --bisect a4 ^a2 ^a3 ^b4
* expecting success: check_output bisect-c3-a2-a3-b4-c2 "git rev-list $_bisect_option c3 ^a2 ^a3 ^b4 ^c2"
* ok 45: --bisect c3 ^a2 ^a3 ^b4 ^c2
* passed all 45 test(s)
*** t6003-rev-list-topo-order.sh ***
* expecting success: check_output rev-list-has-correct-number-of-entries "git rev-list HEAD | wc -l | tr -d \" \""
* ok 1: rev-list has correct number of entries
* expecting success: check_output simple-topo-order "git rev-list --topo-order HEAD"
* ok 2: simple topo order
* expecting success: check_output two-diamonds-topo-order-g6 "git rev-list --topo-order g4"
* ok 3: two diamonds topo order (g6)
* expecting success: check_output multiple-heads "git rev-list --topo-order a3 b3 c3"
* ok 4: multiple heads
* expecting success: check_output multiple-heads-prune-at-a1 "git rev-list --topo-order a3 b3 c3 ^a1"
* ok 5: multiple heads, prune at a1
* expecting success: check_output multiple-heads-prune-at-l1 "git rev-list --topo-order a3 b3 c3 ^l1"
* ok 6: multiple heads, prune at l1
* expecting success: check_output cross-epoch-head-at-l5-prune-at-l1 "git rev-list --topo-order l5 ^l1"
* ok 7: cross-epoch, head at l5, prune at l1
* expecting success: check_output duplicated-head-arguments "git rev-list --topo-order l5 l5 ^l1"
* ok 8: duplicated head arguments
* expecting success: check_output prune-near-topo "git rev-list --topo-order a4 ^c3"
* ok 9: prune near topo
* expecting success: check_output head-has-no-parent "git rev-list --topo-order root"
* ok 10: head has no parent
* expecting success: check_output two-nodes-one-head-one-base "git rev-list --topo-order l0"
* ok 11: two nodes - one head, one base
* expecting success: check_output three-nodes-one-head-one-internal-one-base "git rev-list --topo-order l1"
* ok 12: three nodes one head, one internal, one base
* expecting success: check_output linear-prune-l2-root "git rev-list --topo-order l2 ^root"
* ok 13: linear prune l2 ^root
* expecting success: check_output linear-prune-l2-l0 "git rev-list --topo-order l2 ^l0"
* ok 14: linear prune l2 ^l0
* expecting success: check_output linear-prune-l2-l1 "git rev-list --topo-order l2 ^l1"
* ok 15: linear prune l2 ^l1
* expecting success: check_output linear-prune-l5-a4 "git rev-list --topo-order l5 ^a4"
* ok 16: linear prune l5 ^a4
* expecting success: check_output linear-prune-l5-l3 "git rev-list --topo-order l5 ^l3"
* ok 17: linear prune l5 ^l3
* expecting success: check_output linear-prune-l5-l4 "git rev-list --topo-order l5 ^l4"
* ok 18: linear prune l5 ^l4
* expecting success: check_output max-count-10-topo-order "git rev-list --topo-order --max-count=10 l5"
* ok 19: max-count 10 - topo order
* expecting success: check_output max-count-10-non-topo-order "git rev-list --max-count=10 l5"
* ok 20: max-count 10 - non topo order
* expecting success: check_output max-age-c3-no-topo-order "git rev-list --max-age=51148811 l5"
* ok 21: --max-age=c3, no --topo-order
* expecting success: check_output one-specified-head-reachable-from-another-a4-c3-topo-order "list_duplicates git rev-list --topo-order a4 c3"
* ok 22: one specified head reachable from another a4, c3, --topo-order
* expecting success: check_output one-specified-head-reachable-from-another-c3-a4-topo-order "list_duplicates git rev-list --topo-order c3 a4"
* ok 23: one specified head reachable from another c3, a4, --topo-order
* expecting success: check_output one-specified-head-reachable-from-another-a4-c3-no-topo-order "list_duplicates git rev-list a4 c3"
* ok 24: one specified head reachable from another a4, c3, no --topo-order
* expecting success: check_output one-specified-head-reachable-from-another-c3-a4-no-topo-order "list_duplicates git rev-list c3 a4"
* ok 25: one specified head reachable from another c3, a4, no --topo-order
* expecting success: check_output graph-with-c3-and-a4-parents-of-head "list_duplicates git rev-list m1"
* ok 26: graph with c3 and a4 parents of head
* expecting success: check_output graph-with-a4-and-c3-parents-of-head "list_duplicates git rev-list m2"
* ok 27: graph with a4 and c3 parents of head
* expecting success: git rev-list --topo-order a3 ^a3
* ok 28: head ^head --topo-order
* expecting success: git rev-list a3 ^a3
* ok 29: head ^head no --topo-order
* expecting success: check_output simple-topo-order-l5r1 "git rev-list --topo-order l5r1"
* ok 30: simple topo order (l5r1)
* expecting success: check_output simple-topo-order-r1l5 "git rev-list --topo-order r1l5"
* ok 31: simple topo order (r1l5)
* expecting success: check_output don-t-print-things-unreachable-from-one-branch "git rev-list a3 ^b3 --topo-order"
* ok 32: don't print things unreachable from one branch
* expecting success: check_output topo-order-a4-l3 "git rev-list --topo-order a4 l3"
* ok 33: --topo-order a4 l3
* passed all 33 test(s)
*** t6004-rev-list-path-optim.sh ***
* expecting success:
echo Hello > a &&
git add a &&
git commit -m "Initial commit" a &&
initial=$(git rev-parse --verify HEAD)
Created initial commit 87c2a4c: Initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
* ok 1: setup
* expecting success:
commit=$(echo "Unchanged tree" | git commit-tree "HEAD^{tree}" -p HEAD) &&
test $(git rev-list $commit | wc -l) = 2 &&
test $(git rev-list $commit -- . | wc -l) = 1
* ok 2: path-optimization
* expecting success:
git checkout -b side &&
echo Irrelevant >c &&
git add c &&
git commit -m "Side makes an irrelevant commit" &&
echo "More Irrelevancy" >c &&
git add c &&
git commit -m "Side makes another irrelevant commit" &&
echo Bye >a &&
git add a &&
git commit -m "Side touches a" &&
side=$(git rev-parse --verify HEAD) &&
echo "Yet more Irrelevancy" >c &&
git add c &&
git commit -m "Side makes yet another irrelevant commit" &&
git checkout master &&
echo Another >b &&
git add b &&
git commit -m "Master touches b" &&
git merge side &&
echo Touched >b &&
git add b &&
git commit -m "Master touches b again"
Switched to a new branch "side"
Created commit ae80a32: Side makes an irrelevant commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 c
Created commit 7237b34: Side makes another irrelevant commit
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 4469c3c: Side touches a
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 2a87b0b: Side makes yet another irrelevant commit
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "master"
Created commit 2e9f43c: Master touches b
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 b
Merging HEAD with side
Merging:
2e9f43c Master touches b
2a87b0b Side makes yet another irrelevant commit
found 1 common ancestor(s):
87c2a4c Initial commit
Merge made by recursive.
a | 2 +-
c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
create mode 100644 c
Created commit 4962344: Master touches b again
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 3: further setup
* expecting success:
( echo "$side"; echo "$initial" ) >expected &&
git rev-list HEAD -- a >actual &&
diff -u expected actual
* ok 4: path optimization 2
* passed all 4 test(s)
*** t6005-rev-list-count.sh ***
* expecting success:
for n in 1 2 3 4 5 ; do \
echo $n > a ; \
git add a ; \
git commit -m "$n" ; \
done
Created initial commit c560f61: 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Created commit 3c5ad82: 2
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 1c208ef: 3
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit bc81b21: 4
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit d1dbd0d: 5
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 1: setup
* expecting success:
test $(git rev-list HEAD | wc -l) = 5
* ok 2: no options
* expecting success:
test $(git rev-list HEAD --max-count=0 | wc -l) = 0 &&
test $(git rev-list HEAD --max-count=3 | wc -l) = 3 &&
test $(git rev-list HEAD --max-count=5 | wc -l) = 5 &&
test $(git rev-list HEAD --max-count=10 | wc -l) = 5
* ok 3: --max-count
* expecting success:
test $(git rev-list HEAD --max-count=1 | wc -l) = 1 &&
test $(git rev-list HEAD -1 | wc -l) = 1 &&
test $(git rev-list HEAD -n1 | wc -l) = 1 &&
test $(git rev-list HEAD -n 1 | wc -l) = 1
* ok 4: --max-count all forms
* expecting success:
test $(git rev-list HEAD --skip=0 | wc -l) = 5 &&
test $(git rev-list HEAD --skip=3 | wc -l) = 2 &&
test $(git rev-list HEAD --skip=5 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=10 | wc -l) = 0
* ok 5: --skip
* expecting success:
test $(git rev-list HEAD --skip=0 --max-count=0 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=0 --max-count=10 | wc -l) = 5 &&
test $(git rev-list HEAD --skip=3 --max-count=0 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=3 --max-count=1 | wc -l) = 1 &&
test $(git rev-list HEAD --skip=3 --max-count=2 | wc -l) = 2 &&
test $(git rev-list HEAD --skip=3 --max-count=10 | wc -l) = 2 &&
test $(git rev-list HEAD --skip=5 --max-count=10 | wc -l) = 0 &&
test $(git rev-list HEAD --skip=10 --max-count=10 | wc -l) = 0
* ok 6: --skip --max-count
* passed all 6 test(s)
*** t6006-rev-list-format.sh ***
* expecting success:
touch foo && git add foo && git-commit -m "added foo" &&
echo changed >foo && git-commit -a -m "changed foo"
Created initial commit 86c75cf: added foo
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo
Created commit 131a310: changed foo
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 1: setup
* expecting success:
git rev-list --pretty=format:%H%n%h master >output.hash &&
git diff expect.hash output.hash
* ok 2: format hash
* expecting success:
git rev-list --pretty=format:%T%n%t master >output.tree &&
git diff expect.tree output.tree
* ok 3: format tree
* expecting success:
git rev-list --pretty=format:%P%n%p master >output.parents &&
git diff expect.parents output.parents
* ok 4: format parents
* expecting success:
git rev-list --pretty=format:%an%n%ae%n%ad%n%aD%n%at master >output.author &&
git diff expect.author output.author
* ok 5: format author
* expecting success:
git rev-list --pretty=format:%cn%n%ce%n%cd%n%cD%n%ct master >output.committer &&
git diff expect.committer output.committer
* ok 6: format committer
* expecting success:
git rev-list --pretty=format:%e master >output.encoding &&
git diff expect.encoding output.encoding
* ok 7: format encoding
* expecting success:
git rev-list --pretty=format:%s master >output.subject &&
git diff expect.subject output.subject
* ok 8: format subject
* expecting success:
git rev-list --pretty=format:%b master >output.body &&
git diff expect.body output.body
* ok 9: format body
* expecting success:
git rev-list --pretty=format:%Credfoo%Cgreenbar%Cbluebaz%Cresetxyzzy master >output.colors &&
git diff expect.colors output.colors
* ok 10: format colors
* expecting success:
git config i18n.commitencoding iso8859-1 &&
echo change2 >foo && git-commit -a -F commit-msg
Created commit f58db70: Test printing of complex bodies
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 11: setup complex body
* expecting success:
git rev-list --pretty=format:%e master >output.complex-encoding &&
git diff expect.complex-encoding output.complex-encoding
* ok 12: format complex-encoding
* expecting success:
git rev-list --pretty=format:%s master >output.complex-subject &&
git diff expect.complex-subject output.complex-subject
* ok 13: format complex-subject
* expecting success:
git rev-list --pretty=format:%b master >output.complex-body &&
git diff expect.complex-body output.complex-body
* ok 14: format complex-body
* expecting success:
test_tick &&
C=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&
A=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&
test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700" || {
echo "Eh? $A" >failure
false
}
* ok 15: empty email
* passed all 15 test(s)
*** t6007-rev-list-cherry-pick-file.sh ***
* expecting success:
echo Hallo > foo &&
git add foo &&
test_tick &&
git commit -m "A" &&
git tag A &&
git checkout -b branch &&
echo Bello > foo &&
echo Cello > bar &&
git add foo bar &&
test_tick &&
git commit -m "C" &&
git tag C &&
git checkout master &&
git checkout branch foo &&
test_tick &&
git commit -m "B" &&
git tag B
Created initial commit 87a5b85: A
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
Switched to a new branch "branch"
Created commit d81b112: C
2 files changed, 2 insertions(+), 1 deletions(-)
create mode 100644 bar
Switched to branch "master"
Created commit 77115c1: B
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 1: setup
* expecting success:
test -z "$(git rev-list --left-right --cherry-pick B...C -- foo)"
* ok 2: --cherry-pick foo comes up empty
* expecting success:
! test -z "$(git rev-list --left-right --cherry-pick B...C -- bar)"
* ok 3: --cherry-pick bar does not come up empty
* expecting success:
git symbolic-ref HEAD refs/heads/independent &&
rm .git/index &&
echo Hallo > foo &&
git add foo &&
test_tick &&
git commit -m "independent" &&
echo Bello > foo &&
test_tick &&
git commit -m "independent, too" foo &&
test -z "$(git rev-list --left-right --cherry-pick \
HEAD...master -- foo)"
Created initial commit 2033a80: independent
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
Created commit 6214f96: independent, too
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 4: --cherry-pick with independent, but identical branches
* passed all 4 test(s)
*** t6008-rev-list-submodule.sh ***
* expecting success:
: > file &&
git add file &&
test_tick &&
git commit -m initial &&
echo 1 > file &&
test_tick &&
git commit -m second file &&
echo 2 > file &&
test_tick &&
git commit -m third file &&
rm .git/index &&
: > super-file &&
git add super-file &&
git submodule add . sub &&
git symbolic-ref HEAD refs/heads/super &&
test_tick &&
git commit -m super-initial &&
echo 1 > super-file &&
test_tick &&
git commit -m super-first super-file &&
echo 2 > super-file &&
test_tick &&
git commit -m super-second super-file
Created initial commit 1bd44cb: initial
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit 534ad2c: second
1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 1795412: third
1 files changed, 1 insertions(+), 1 deletions(-)
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/sub/.git/
0 blocks
Created initial commit 260b527: super-initial
2 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 .gitmodules
create mode 160000 sub
create mode 100644 super-file
Created commit 26ce2cb: super-first
1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 0b217bb: super-second
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 1: setup
* expecting success:
git rev-list --objects super master ^super^
0b217bb1040b256cf8074da8ddf9dfee7247f993
17954123b4d2a45f7e0fec2fea14972db2b90a1f
534ad2c6e7b5b68dcaa4f008327c6c2ab1fa47ff
1bd44cb9d13204b0fe1958db0082f5028a16eb3a
39af08da8a8c6cbc43fef132955cca61fbfdb409
0cfbf08886fca9a91cb753ec8734c84fcbe52c9f super-file
d9cc608eedd5d2cc63c262272b7a0f6ab6aed5dd
f27c6ae26adb8396d3861976ba268f87ad8afa0b
df2b8fc99e1c1d4dbc0a854d9f72157f1d6ea078
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 file
* ok 2: Ilari's test
* passed all 2 test(s)
*** t6010-merge-base.sh ***
* expecting success: MB=$(git merge-base G H) &&
expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/B"
47
* ok 1: compute merge-base (single)
* expecting success: MB=$(git merge-base --all G H) &&
expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/B"
47
* ok 2: compute merge-base (all)
* expecting success: MB=$(git show-branch --merge-base G H) &&
expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/B"
47
* ok 3: compute merge-base with show-branch
* expecting success: MB=$(git merge-base PL PR) &&
expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/C2"
48
* ok 4: compute merge-base (single)
* expecting success: MB=$(git merge-base --all PL PR) &&
expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/C2"
48
* ok 5: compute merge-base (all)
* passed all 5 test(s)
*** t6020-merge-df.sh ***
* expecting success: echo "Hello" > init &&
git add init &&
git commit -m "Initial commit" &&
git branch B &&
mkdir dir &&
echo "foo" > dir/foo &&
git add dir/foo &&
git commit -m "File: dir/foo" &&
git checkout B &&
echo "file dir" > dir &&
git add dir &&
git commit -m "File: dir"
Created initial commit 1c6a427: Initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 init
Created commit 7861f18: File: dir/foo
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 dir/foo
Switched to branch "B"
Created commit e9bec56: File: dir
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 dir
* ok 1: prepare repository
* expecting exit code 1: git merge "merge msg" B master
Merging B with master
Merging:
e9bec56 File: dir
7861f18 File: dir/foo
found 1 common ancestor(s):
1c6a427 Initial commit
CONFLICT (file/directory): There is a directory with name dir in master. Added dir as dir~B
Added dir/foo
Automatic merge failed; fix conflicts and then commit the result.
* ok 2: Merge with d/f conflicts
* passed all 2 test(s)
*** t6021-merge-criss-cross.sh ***
* expecting success: echo "1
2
3
4
5
6
7
8
9" > file &&
git add file &&
git commit -m "Initial commit" file &&
git branch A &&
git branch B &&
git checkout A &&
echo "1
2
3
4
5
6
7
8 changed in B8, branch A
9" > file &&
git commit -m "B8" file &&
git checkout B &&
echo "1
2
3 changed in C3, branch B
4
5
6
7
8
9
" > file &&
git commit -m "C3" file &&
git branch C3 &&
git merge "pre E3 merge" B A &&
echo "1
2
3 changed in E3, branch B. New file size
4
5
6
7
8 changed in B8, branch A
9
" > file &&
git commit -m "E3" file &&
git checkout A &&
git merge "pre D8 merge" A C3 &&
echo "1
2
3 changed in C3, branch B
4
5
6
7
8 changed in D8, branch A. New file size 2
9" > file &&
git commit -m D8 file
Created initial commit 1e39064: Initial commit
1 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 file
Switched to branch "A"
Created commit 6c31e01: B8
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "B"
Created commit ea9913a: C3
1 files changed, 2 insertions(+), 1 deletions(-)
Merging B with A
Merging:
ea9913a C3
6c31e01 B8
found 1 common ancestor(s):
1e39064 Initial commit
Auto-merged file
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 3141eb6: E3
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "A"
Merging A with C3
Merging:
6c31e01 B8
ea9913a C3
found 1 common ancestor(s):
1e39064 Initial commit
Auto-merged file
Merge made by recursive.
file | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Created commit 0a4f8fd: D8
1 files changed, 1 insertions(+), 2 deletions(-)
* ok 1: prepare repository
* expecting success: git merge "final merge" A B
Merging A with B
Merging:
0a4f8fd D8
3141eb6 E3
found 2 common ancestor(s):
ea9913a C3
6c31e01 B8
Merging:
ea9913a C3
6c31e01 B8
found 1 common ancestor(s):
1e39064 Initial commit
Auto-merged file
Auto-merged file
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 2: Criss-cross merge
* expecting success: cmp file file-expect
* ok 3: Criss-cross merge result
* passed all 3 test(s)
*** t6022-merge-rename.sh ***
* expecting success:
cat >A <<\EOF &&
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
c cccccccccccccccccccccccccccccccccccccccccccccccc
d dddddddddddddddddddddddddddddddddddddddddddddddd
e eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
f ffffffffffffffffffffffffffffffffffffffffffffffff
g gggggggggggggggggggggggggggggggggggggggggggggggg
h hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
j jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
k kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
l llllllllllllllllllllllllllllllllllllllllllllllll
m mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
n nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
o oooooooooooooooooooooooooooooooooooooooooooooooo
EOF
cat >M <<\EOF &&
A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
B BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
K KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
L LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
N NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
EOF
git add A M &&
git commit -m "initial has A and M" &&
git branch white &&
git branch red &&
git branch blue &&
git branch yellow &&
git branch change &&
git branch change+rename &&
sed -e "/^g /s/.*/g : master changes a line/" <A >A+ &&
mv A+ A &&
git commit -a -m "master updates A" &&
git checkout yellow &&
rm -f M &&
git commit -a -m "yellow removes M" &&
git checkout white &&
sed -e "/^g /s/.*/g : white changes a line/" <A >B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "white renames A->B, M->N" &&
git checkout red &&
sed -e "/^g /s/.*/g : red changes a line/" <A >B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "red renames A->B, M->N" &&
git checkout blue &&
sed -e "/^g /s/.*/g : blue changes a line/" <A >C &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A C M N &&
git commit -m "blue renames A->C, M->N" &&
git checkout change &&
sed -e "/^g /s/.*/g : changed line/" <A >A+ &&
mv A+ A &&
git commit -q -a -m "changed" &&
git checkout change+rename &&
sed -e "/^g /s/.*/g : changed line/" <A >B &&
rm A &&
git update-index --add B &&
git commit -q -a -m "changed and renamed" &&
git checkout master
Created initial commit 360d6f7: initial has A and M
2 files changed, 30 insertions(+), 0 deletions(-)
create mode 100644 A
create mode 100644 M
Created commit a2e1595: master updates A
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "yellow"
Created commit 05eef87: yellow removes M
1 files changed, 0 insertions(+), 15 deletions(-)
delete mode 100644 M
Switched to branch "white"
Created commit 1cf6cce: white renames A->B, M->N
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
Switched to branch "red"
Created commit 22109c8: red renames A->B, M->N
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
Switched to branch "blue"
Created commit 94c9562: blue renames A->C, M->N
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => C (93%)
rename M => N (93%)
Switched to branch "change"
Switched to branch "change+rename"
Switched to branch "master"
* ok 1: setup
* expecting success:
git show-branch
git pull . white && {
echo "BAD: should have conflicted"
return 1
}
git ls-files -s
test "$(git ls-files -u B | wc -l)" -eq 3 || {
echo "BAD: should have left stages for B"
return 1
}
test "$(git ls-files -s N | wc -l)" -eq 1 || {
echo "BAD: should have merged N"
return 1
}
sed -ne "/^g/{
p
q
}" B | grep master || {
echo "BAD: should have listed our change first"
return 1
}
test "$(git diff white N | wc -l)" -eq 0 || {
echo "BAD: should have taken colored branch"
return 1
}
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
* [master] master updates A
+++*+++ [yellow^] initial has A and M
Merging HEAD with 1cf6ccee6cfa6fb06ecbba2d8d14877a3c7b6580
Merging:
a2e1595 master updates A
1cf6cce white renames A->B, M->N
found 1 common ancestor(s):
360d6f7 initial has A and M
Renamed A => B
Auto-merged B
CONFLICT (rename/modify): Merge conflict in B
Skipped N (merged same as existing)
Automatic merge failed; fix conflicts and then commit the result.
100644 aed72d761b68c20ffce8249a5a0426494098d376 1 B
100644 c68856fe0bfce4eb453d8e12329c47ab60c8107b 2 B
100644 2d603156dc5bdf6295c789cac08e3c9942a0b82a 3 B
100644 ba41fb96393979b22691106b06bf5231eab57b85 0 N
g : master changes a line
* ok 2: pull renaming branch into unrenaming one
* expecting success:
rm -f B
git reset --hard
git checkout red
git pull . white && {
echo "BAD: should have conflicted"
return 1
}
test "$(git ls-files -u B | wc -l)" -eq 3 || {
echo "BAD: should have left stages"
return 1
}
test "$(git ls-files -s N | wc -l)" -eq 1 || {
echo "BAD: should have merged N"
return 1
}
sed -ne "/^g/{
p
q
}" B | grep red || {
echo "BAD: should have listed our change first"
return 1
}
test "$(git diff white N | wc -l)" -eq 0 || {
echo "BAD: should have taken colored branch"
return 1
}
HEAD is now at a2e1595... master updates A
Switched to branch "red"
Merging HEAD with 1cf6ccee6cfa6fb06ecbba2d8d14877a3c7b6580
Merging:
22109c8 red renames A->B, M->N
1cf6cce white renames A->B, M->N
found 1 common ancestor(s):
360d6f7 initial has A and M
Renamed A->B
Auto-merged B
CONFLICT (content): merge conflict in B
Renamed M->N
Auto-merged N
Automatic merge failed; fix conflicts and then commit the result.
g : red changes a line
* ok 3: pull renaming branch into another renaming one
* expecting success:
git reset --hard
git show-branch
git pull . master && {
echo "BAD: should have conflicted"
return 1
}
test "$(git ls-files -u B | wc -l)" -eq 3 || {
echo "BAD: should have left stages"
return 1
}
test "$(git ls-files -s N | wc -l)" -eq 1 || {
echo "BAD: should have merged N"
return 1
}
sed -ne "/^g/{
p
q
}" B | grep red || {
echo "BAD: should have listed our change first"
return 1
}
test "$(git diff white N | wc -l)" -eq 0 || {
echo "BAD: should have taken colored branch"
return 1
}
HEAD is now at 22109c8... red renames A->B, M->N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
* [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
* [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [master] master updates A
++++*++ [yellow^] initial has A and M
Merging HEAD with a2e1595ec1517903b00eb0b61200f5d8dcc99138
Merging:
22109c8 red renames A->B, M->N
a2e1595 master updates A
found 1 common ancestor(s):
360d6f7 initial has A and M
Renamed A => B
Auto-merged B
CONFLICT (rename/modify): Merge conflict in B
Skipped N (merged same as existing)
Automatic merge failed; fix conflicts and then commit the result.
g : red changes a line
* ok 4: pull unrenaming branch into renaming one
* expecting success:
git reset --hard
git show-branch
git pull . blue && {
echo "BAD: should have conflicted"
return 1
}
test "$(git ls-files -u A | wc -l)" -eq 1 || {
echo "BAD: should have left a stage"
return 1
}
test "$(git ls-files -u B | wc -l)" -eq 1 || {
echo "BAD: should have left a stage"
return 1
}
test "$(git ls-files -u C | wc -l)" -eq 1 || {
echo "BAD: should have left a stage"
return 1
}
test "$(git ls-files -s N | wc -l)" -eq 1 || {
echo "BAD: should have merged N"
return 1
}
sed -ne "/^g/{
p
q
}" B | grep red || {
echo "BAD: should have listed our change first"
return 1
}
test "$(git diff white N | wc -l)" -eq 0 || {
echo "BAD: should have taken colored branch"
return 1
}
HEAD is now at 22109c8... red renames A->B, M->N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
* [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
* [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [master] master updates A
++++*++ [yellow^] initial has A and M
Merging HEAD with 94c9562797c341da1a728f7c51f8eb5a976e2f57
Merging:
22109c8 red renames A->B, M->N
94c9562 blue renames A->C, M->N
found 1 common ancestor(s):
360d6f7 initial has A and M
CONFLICT (rename/rename): Rename "A"->"B" in branch "HEAD" rename "A"->"C" in "94c9562797c341da1a728f7c51f8eb5a976e2f57"
Renamed M->N
Auto-merged N
Automatic merge failed; fix conflicts and then commit the result.
g : red changes a line
* ok 5: pull conflicting renames
* expecting success:
git reset --hard
git show-branch
echo >A this file should not matter
git pull . white && {
echo "BAD: should have conflicted"
return 1
}
test -f A || {
echo "BAD: should have left A intact"
return 1
}
HEAD is now at 22109c8... red renames A->B, M->N
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
* [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
* [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [master] master updates A
++++*++ [yellow^] initial has A and M
Merging HEAD with 1cf6ccee6cfa6fb06ecbba2d8d14877a3c7b6580
Merging:
22109c8 red renames A->B, M->N
1cf6cce white renames A->B, M->N
found 1 common ancestor(s):
360d6f7 initial has A and M
Renamed A->B
Auto-merged B
CONFLICT (content): merge conflict in B
Renamed M->N
Auto-merged N
Automatic merge failed; fix conflicts and then commit the result.
* ok 6: interference with untracked working tree file
* expecting success:
git reset --hard
git checkout white
git show-branch
rm -f A
echo >A this file should not matter
git pull . red && {
echo "BAD: should have conflicted"
return 1
}
test -f A || {
echo "BAD: should have left A intact"
return 1
}
HEAD is now at 22109c8... red renames A->B, M->N
Switched to branch "white"
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
! [red] red renames A->B, M->N
* [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
* [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [master] master updates A
+++++*+ [yellow^] initial has A and M
Merging HEAD with 22109c86807e1e6ae0b13cd8ce28188bd6a8b9e0
Merging:
1cf6cce white renames A->B, M->N
22109c8 red renames A->B, M->N
found 1 common ancestor(s):
360d6f7 initial has A and M
Renamed A->B
Auto-merged B
CONFLICT (content): merge conflict in B
Renamed M->N
Auto-merged N
Automatic merge failed; fix conflicts and then commit the result.
* ok 7: interference with untracked working tree file
* expecting success:
git reset --hard
rm -f A M
git checkout -f master
git tag -f anchor
git show-branch
git pull . yellow || {
echo "BAD: should have cleanly merged"
return 1
}
test -f M && {
echo "BAD: should have removed M"
return 1
}
git reset --hard anchor
HEAD is now at 1cf6cce... white renames A->B, M->N
Switched to branch "master"
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
* [master] master updates A
+++*+++ [yellow^] initial has A and M
Merging HEAD with 05eef87d87e99dc0ac9f3797401550ac371893fd
Merging:
a2e1595 master updates A
05eef87 yellow removes M
found 1 common ancestor(s):
360d6f7 initial has A and M
Removed M
Merge made by recursive.
M | 15 ---------------
1 files changed, 0 insertions(+), 15 deletions(-)
delete mode 100644 M
HEAD is now at a2e1595... master updates A
* ok 8: interference with untracked working tree file
* expecting success:
git reset --hard
rm -f A M
git checkout -f master
git tag -f anchor
git show-branch
echo >>M one line addition
cat M >M.saved
git pull . yellow && {
echo "BAD: should have complained"
return 1
}
diff M M.saved || {
echo "BAD: should have left M intact"
return 1
}
rm -f M.saved
HEAD is now at a2e1595... master updates A
Already on branch "master"
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
* [master] master updates A
+++*+++ [yellow^] initial has A and M
M: needs update
fatal: Entry 'M' not uptodate. Cannot merge.
Merging HEAD with 05eef87d87e99dc0ac9f3797401550ac371893fd
Merging:
a2e1595 master updates A
05eef87 yellow removes M
found 1 common ancestor(s):
360d6f7 initial has A and M
Merge with strategy recursive failed.
* ok 9: updated working tree file should prevent the merge
* expecting success:
git reset --hard
rm -f A M
git checkout -f master
git tag -f anchor
git show-branch
echo >>M one line addition
cat M >M.saved
git update-index M
git pull . yellow && {
echo "BAD: should have complained"
return 1
}
diff M M.saved || {
echo "BAD: should have left M intact"
return 1
}
rm -f M.saved
HEAD is now at a2e1595... master updates A
Already on branch "master"
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
* [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
! [yellow] yellow removes M
-------
+ [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
* [master] master updates A
+++*+++ [yellow^] initial has A and M
fatal: Entry 'M' would be overwritten by merge. Cannot merge.
Merging HEAD with 05eef87d87e99dc0ac9f3797401550ac371893fd
Merging:
a2e1595 master updates A
05eef87 yellow removes M
found 1 common ancestor(s):
360d6f7 initial has A and M
Merge with strategy recursive failed.
* ok 10: updated working tree file should prevent the merge
* expecting success:
git reset --hard
rm -f A M
git checkout -f yellow
git tag -f anchor
git show-branch
echo >M this file should not matter
git pull . master || {
echo "BAD: should have cleanly merged"
return 1
}
test -f M || {
echo "BAD: should have left M intact"
return 1
}
git ls-files -s | grep M && {
echo "BAD: M must be untracked in the result"
return 1
}
git reset --hard anchor
HEAD is now at a2e1595... master updates A
Switched to branch "yellow"
! [blue] blue renames A->C, M->N
! [change] changed
! [change+rename] changed and renamed
! [master] master updates A
! [red] red renames A->B, M->N
! [white] white renames A->B, M->N
* [yellow] yellow removes M
-------
* [yellow] yellow removes M
+ [white] white renames A->B, M->N
+ [red] red renames A->B, M->N
+ [change+rename] changed and renamed
+ [change] changed
+ [blue] blue renames A->C, M->N
+ [master] master updates A
++++++* [yellow^] initial has A and M
Merging HEAD with a2e1595ec1517903b00eb0b61200f5d8dcc99138
Merging:
05eef87 yellow removes M
a2e1595 master updates A
found 1 common ancestor(s):
360d6f7 initial has A and M
Merge made by recursive.
A | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
HEAD is now at 05eef87... yellow removes M
* ok 11: interference with untracked working tree file
* expecting success:
rm -f A M N
git reset --hard &&
git checkout change+rename &&
GIT_MERGE_VERBOSITY=3 git merge change | grep "^Skipped B" &&
git reset --hard HEAD^ &&
git checkout change &&
GIT_MERGE_VERBOSITY=3 git merge change+rename | grep "^Skipped B"
HEAD is now at 05eef87... yellow removes M
Switched to branch "change+rename"
Skipped B (merged same as existing)
HEAD is now at 4df82a7... changed and renamed
Switched to branch "change"
Skipped B (merged same as existing)
* ok 12: merge of identical changes in a renamed file
* passed all 12 test(s)
*** t6023-merge-file.sh ***
* expecting success: git merge-file test.txt orig.txt new2.txt
* ok 1: merge without conflict
* expecting success: git merge-file test2.txt orig.txt new2.txt
* ok 2: merge without conflict (missing LF at EOF)
* expecting success: git diff test.txt test2.txt
* ok 3: merge result added missing LF
* expecting failure: git merge-file test.txt orig.txt new3.txt
* ok 4: merge with conflicts
* expecting success: git diff test.txt expect.txt
* ok 5: expected conflict markers
* expecting failure: git merge-file -L 1 -L 2 test.txt orig.txt new3.txt
* ok 6: merge with conflicts, using -L
* expecting success: git diff test.txt expect.txt
* ok 7: expected conflict markers, with -L
* expecting failure: git merge-file -p orig.txt new1.txt new5.txt > out
* ok 8: conflict in removed tail
* expecting success: git diff expect out
* ok 9: expected conflict markers
* expecting success:
! git merge-file -p orig.txt ../test4012.png new1.txt 2> merge.err &&
grep "Cannot merge binary files" merge.err
error: Cannot merge binary files: ../test4012.png
* ok 10: binary files cannot be merged
* passed all 10 test(s)
*** t6023-merge-rename-nocruft.sh ***
* expecting success:
cat >A <<\EOF &&
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
c cccccccccccccccccccccccccccccccccccccccccccccccc
d dddddddddddddddddddddddddddddddddddddddddddddddd
e eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
f ffffffffffffffffffffffffffffffffffffffffffffffff
g gggggggggggggggggggggggggggggggggggggggggggggggg
h hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
i iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
j jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
k kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
l llllllllllllllllllllllllllllllllllllllllllllllll
m mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
n nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
o oooooooooooooooooooooooooooooooooooooooooooooooo
EOF
cat >M <<\EOF &&
A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
B BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
D DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
E EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
F FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
G GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
H HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
I IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
J JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ
K KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
L LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
M MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
N NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
O OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
EOF
git add A M &&
git commit -m "initial has A and M" &&
git branch white &&
git branch red &&
git branch blue &&
git checkout white &&
sed -e "/^g /s/.*/g : white changes a line/" <A >B &&
sed -e "/^G /s/.*/G : colored branch changes a line/" <M >N &&
rm -f A M &&
git update-index --add --remove A B M N &&
git commit -m "white renames A->B, M->N" &&
git checkout red &&
echo created by red >R &&
git update-index --add R &&
git commit -m "red creates R" &&
git checkout blue &&
sed -e "/^o /s/.*/g : blue changes a line/" <A >B &&
rm -f A &&
mv B A &&
git update-index A &&
git commit -m "blue modify A" &&
git checkout master
Created initial commit 18dbd69: initial has A and M
2 files changed, 30 insertions(+), 0 deletions(-)
create mode 100644 A
create mode 100644 M
Switched to branch "white"
Created commit cc9f86c: white renames A->B, M->N
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
Switched to branch "red"
Created commit 529e402: red creates R
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 R
Switched to branch "blue"
Created commit f33a57b: blue modify A
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "master"
* ok 1: setup
* expecting success:
git checkout -b red-white red &&
git merge white &&
git write-tree >/dev/null || {
echo "BAD: merge did not complete"
return 1
}
test -f B || {
echo "BAD: B does not exist in working directory"
return 1
}
test -f N || {
echo "BAD: N does not exist in working directory"
return 1
}
test -f R || {
echo "BAD: R does not exist in working directory"
return 1
}
test -f A && {
echo "BAD: A still exists in working directory"
return 1
}
test -f M && {
echo "BAD: M still exists in working directory"
return 1
}
return 0
Switched to a new branch "red-white"
Merging HEAD with white
Merging:
529e402 red creates R
cc9f86c white renames A->B, M->N
found 1 common ancestor(s):
18dbd69 initial has A and M
Skipped B (merged same as existing)
Skipped N (merged same as existing)
Merge made by recursive.
A => B | 2 +-
M => N | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename A => B (93%)
rename M => N (93%)
* ok 2: merge white into red (A->B,M->N)
* expecting success:
git checkout -b white-blue white &&
echo dirty >A &&
git merge blue &&
git write-tree >/dev/null || {
echo "BAD: merge did not complete"
return 1
}
test -f A || {
echo "BAD: A does not exist in working directory"
return 1
}
test `cat A` = dirty || {
echo "BAD: A content is wrong"
return 1
}
test -f B || {
echo "BAD: B does not exist in working directory"
return 1
}
test -f N || {
echo "BAD: N does not exist in working directory"
return 1
}
test -f M && {
echo "BAD: M still exists in working directory"
return 1
}
return 0
Switched to a new branch "white-blue"
Merging HEAD with blue
Merging:
cc9f86c white renames A->B, M->N
f33a57b blue modify A
found 1 common ancestor(s):
18dbd69 initial has A and M
Renamed A => B
Auto-merged B
Skipped N (merged same as existing)
Merge made by recursive.
B | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 3: merge blue into white (A->B, mod A, A untracked)
* passed all 3 test(s)
*** t6024-recursive-merge.sh ***
* expecting success:
echo 1 > a1 &&
git add a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:00" git commit -m 1 a1 &&
git checkout -b A master &&
echo A > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:01" git commit -m A a1 &&
git checkout -b B master &&
echo B > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:02" git commit -m B a1 &&
git checkout -b D A &&
git rev-parse B > .git/MERGE_HEAD &&
echo D > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:03" git commit -m D &&
git symbolic-ref HEAD refs/heads/other &&
echo 2 > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:04" git commit -m 2 a1 &&
git checkout -b C &&
echo C > a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:05" git commit -m C a1 &&
git checkout -b E C &&
git rev-parse B > .git/MERGE_HEAD &&
echo E > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:06" git commit -m E &&
git checkout -b G E &&
git rev-parse A > .git/MERGE_HEAD &&
echo G > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:07" git commit -m G &&
git checkout -b F D &&
git rev-parse C > .git/MERGE_HEAD &&
echo F > a1 &&
git update-index a1 &&
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
Created initial commit 2cb59ab: 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a1
Switched to a new branch "A"
Created commit 9d821b5: A
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to a new branch "B"
Created commit 7082aa6: B
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to a new branch "D"
Created commit e1146db: D
Created initial commit 216d386: 2
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a1
Switched to a new branch "C"
Created commit d264643: C
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to a new branch "E"
Created commit 939285a: E
Switched to a new branch "G"
Created commit 26f86b6: G
Switched to a new branch "F"
Created commit 71b2f3d: F
* ok 1: setup tests
* expecting failure: git merge -m final G
Merging HEAD with G
Merging:
71b2f3d F
26f86b6 G
found 3 common ancestor(s):
d264643 C
7082aa6 B
9d821b5 A
Merging:
d264643 C
7082aa6 B
found 0 common ancestor(s):
Auto-merged a1
CONFLICT (add/add): Merge conflict in a1
Merging:
virtual merged tree
9d821b5 A
found 1 common ancestor(s):
2cb59ab 1
Auto-merged a1
CONFLICT (content): Merge conflict in a1
Auto-merged a1
CONFLICT (content): Merge conflict in a1
Automatic merge failed; fix conflicts and then commit the result.
* ok 2: combined merge conflicts
* expecting success: git diff expect a1
* ok 3: result contains a conflict
* expecting success: git diff expect out
* ok 4: virtual trees were processed
HEAD is now at 71b2f3d... F
* expecting success:
printf "
Created commit 760f1b1: binary
1 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 binary-file
Switched to branch "G"
Created commit d1c8e67: binary2
1 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 binary-file
warning: Cannot merge binary files: HEAD:binary-file vs. F:binary-file
* ok 5: refuse to merge binary files
* passed all 5 test(s)
*** t6025-merge-symlinks.sh ***
* expecting success:
git config core.symlinks false &&
> file &&
git add file &&
git-commit -m initial &&
git branch b-symlink &&
git branch b-file &&
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git-commit -m master &&
git-checkout b-symlink &&
l=$(echo -n file-different | git-hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git-commit -m b-symlink &&
git-checkout b-file &&
echo plain-file > symlink &&
git add symlink &&
git-commit -m b-file
Created initial commit 6103b7f: initial
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit 467d0bb: master
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 120000 symlink
Switched to branch "b-symlink"
Created commit 73529ef: b-symlink
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 120000 symlink
Switched to branch "b-file"
Created commit 4908d38: b-file
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 symlink
* ok 1: setup
* expecting failure:
! git-checkout b-symlink ||
git-merge master
Switched to branch "b-symlink"
Merging HEAD with master
Merging:
73529ef b-symlink
467d0bb master
found 1 common ancestor(s):
6103b7f initial
Auto-merged symlink
CONFLICT (add/add): Merge conflict in symlink
Automatic merge failed; fix conflicts and then commit the result.
* ok 2: merge master into b-symlink, which has a different symbolic link
* expecting success:
test -f symlink
* ok 3: the merge result must be a file
* expecting failure:
! (git-reset --hard &&
git-checkout b-file) ||
git-merge master
HEAD is now at 73529ef... b-symlink
Switched to branch "b-file"
Merging HEAD with master
Merging:
4908d38 b-file
467d0bb master
found 1 common ancestor(s):
6103b7f initial
Auto-merged symlink
CONFLICT (add/add): Merge conflict in symlink
Automatic merge failed; fix conflicts and then commit the result.
* ok 4: merge master into b-file, which has a file instead of a symbolic link
* expecting success:
test -f symlink
* ok 5: the merge result must be a file
* expecting failure:
! (git-reset --hard &&
git-checkout master) ||
git-merge b-file
HEAD is now at 4908d38... b-file
Switched to branch "master"
Merging HEAD with b-file
Merging:
467d0bb master
4908d38 b-file
found 1 common ancestor(s):
6103b7f initial
Auto-merged symlink
CONFLICT (add/add): Merge conflict in symlink
Automatic merge failed; fix conflicts and then commit the result.
* ok 6: merge b-file, which has a file instead of a symbolic link, into master
* expecting success:
test -f symlink
* ok 7: the merge result must be a file
* passed all 7 test(s)
*** t6026-merge-attr.sh ***
* expecting success:
for f in text binary union
do
echo Initial >$f && git add $f || break
done &&
test_tick &&
git commit -m Initial &&
git branch side &&
for f in text binary union
do
echo Master >>$f && git add $f || break
done &&
test_tick &&
git commit -m Master &&
git checkout side &&
for f in text binary union
do
echo Side >>$f && git add $f || break
done &&
test_tick &&
git commit -m Side &&
git tag anchor
Created initial commit 5f96ff8: Initial
3 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 binary
create mode 100644 text
create mode 100644 union
Created commit 5054610: Master
3 files changed, 3 insertions(+), 0 deletions(-)
Switched to branch "side"
Created commit 03d8861: Side
3 files changed, 3 insertions(+), 0 deletions(-)
* ok 1: setup
* expecting success:
{
echo "binary -merge"
echo "union merge=union"
} >.gitattributes &&
if git merge master
then
echo Gaah, should have conflicted
false
else
echo Ok, conflicted.
fi
Merging HEAD with master
Merging:
03d8861 Side
5054610 Master
found 1 common ancestor(s):
5f96ff8 Initial
Auto-merged binary
CONFLICT (content): Merge conflict in binary
Auto-merged text
CONFLICT (content): Merge conflict in text
Auto-merged union
Automatic merge failed; fix conflicts and then commit the result.
Ok, conflicted.
* ok 2: merge
* expecting success:
git ls-files -u | grep binary &&
git ls-files -u | grep text &&
! (git ls-files -u | grep union)
100644 a77fa514de2720c72c1a861de098595959a2c97a 1 binary
100644 fb25c069fdd4d47c6cf8d3a457b8f620064cba41 2 binary
100644 8950d9fdcf2dc4071be500e078831dbcfca693e1 3 binary
100644 a77fa514de2720c72c1a861de098595959a2c97a 1 text
100644 fb25c069fdd4d47c6cf8d3a457b8f620064cba41 2 text
100644 8950d9fdcf2dc4071be500e078831dbcfca693e1 3 text
* ok 3: check merge result in index
* expecting success:
git cat-file -p HEAD:binary >binary-orig &&
grep "<<<<<<<" text &&
cmp binary-orig binary &&
! grep "<<<<<<<" union &&
grep Master union &&
grep Side union
<<<<<<< HEAD:text
Master
Side
* ok 4: check merge result in working tree
* expecting success:
echo "* merge=union" >.gitattributes &&
echo "text merge=custom" >>.gitattributes &&
git reset --hard anchor &&
git config --replace-all \
merge.custom.driver "./custom-merge %O %A %B 0" &&
git config --replace-all \
merge.custom.name "custom merge driver for testing" &&
git merge master &&
cmp binary union &&
sed -e 1,3d text >check-1 &&
o=$(git-unpack-file master^:text) &&
a=$(git-unpack-file side^:text) &&
b=$(git-unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
rm -f $o $a $b
HEAD is now at 03d8861... Side
Merging HEAD with master
Merging:
03d8861 Side
5054610 Master
found 1 common ancestor(s):
5f96ff8 Initial
Auto-merged binary
Auto-merged text
merging text using custom merge driver for testing
Auto-merged union
Merge made by recursive.
binary | 1 +
text | 9 +++++++++
union | 1 +
3 files changed, 11 insertions(+), 0 deletions(-)
* ok 5: custom merge backend
* expecting success:
git reset --hard anchor &&
git config --replace-all \
merge.custom.driver "./custom-merge %O %A %B 1" &&
git config --replace-all \
merge.custom.name "custom merge driver for testing" &&
if git merge master
then
echo "Eh? should have conflicted"
false
else
echo "Ok, conflicted"
fi &&
cmp binary union &&
sed -e 1,3d text >check-1 &&
o=$(git-unpack-file master^:text) &&
a=$(git-unpack-file anchor:text) &&
b=$(git-unpack-file master:text) &&
sh -c "./custom-merge $o $a $b 0" &&
sed -e 1,3d $a >check-2 &&
cmp check-1 check-2 &&
rm -f $o $a $b
HEAD is now at 03d8861... Side
Merging HEAD with master
Merging:
03d8861 Side
5054610 Master
found 1 common ancestor(s):
5f96ff8 Initial
Auto-merged binary
Auto-merged text
merging text using custom merge driver for testing
CONFLICT (content): Merge conflict in text
Auto-merged union
Automatic merge failed; fix conflicts and then commit the result.
Ok, conflicted
* ok 6: custom merge backend
* passed all 6 test(s)
*** t6027-merge-binary.sh ***
* expecting success:
cat ../test4012.png >m &&
git add m &&
git ls-files -s | sed -e "s/ 0 / 1 /" >E1 &&
test_tick &&
git commit -m "initial" &&
git branch side &&
echo frotz >a &&
git add a &&
echo nitfol >>m &&
git add a m &&
git ls-files -s a >E0 &&
git ls-files -s m | sed -e "s/ 0 / 3 /" >E3 &&
test_tick &&
git commit -m "master adds some" &&
git checkout side &&
echo rezrov >>m &&
git add m &&
git ls-files -s m | sed -e "s/ 0 / 2 /" >E2 &&
test_tick &&
git commit -m "side modifies" &&
git tag anchor &&
cat E0 E1 E2 E3 >expect
Created initial commit f315366: initial
1 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 m
Created commit a142ea1: master adds some
2 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Switched to branch "side"
Created commit 020cbcd: side modifies
1 files changed, 0 insertions(+), 0 deletions(-)
* ok 1: setup
* expecting success:
rm -f a* m* &&
git reset --hard anchor &&
if git merge -s resolve master
then
echo Oops, should not have succeeded
false
else
git ls-files -s >current
diff -u current expect
fi
HEAD is now at 020cbcd... side modifies
Trying really trivial in-index merge...
fatal: Merge requires file-level merging
Nope.
Trying simple merge.
Simple merge failed, trying Automatic merge.
Auto-merging m
error: Cannot merge binary files: .merge_file_gZzMIu
ERROR: Merge conflict in m
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.
* ok 2: resolve
* expecting success:
rm -f a* m* &&
git reset --hard anchor &&
if git merge -s recursive master
then
echo Oops, should not have succeeded
false
else
git ls-files -s >current
diff -u current expect
fi
HEAD is now at 020cbcd... side modifies
warning: Cannot merge binary files: HEAD:m vs. master:m
Merging HEAD with master
Merging:
020cbcd side modifies
a142ea1 master adds some
found 1 common ancestor(s):
f315366 initial
Auto-merged m
CONFLICT (content): Merge conflict in m
Automatic merge failed; fix conflicts and then commit the result.
* ok 3: recursive
* passed all 3 test(s)
*** t6028-merge-up-to-date.sh ***
* expecting success:
>file &&
git add file &&
test_tick &&
git commit -m initial &&
git tag c0 &&
echo second >file &&
git add file &&
test_tick &&
git commit -m second &&
git tag c1 &&
git branch test
Created initial commit 1bd44cb: initial
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit e042178: second
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 1: setup
* expecting success:
git reset --hard c1 &&
test_tick &&
git merge -s recursive c0 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at e042178... second
Already up-to-date.
* ok 2: merge -s recursive up-to-date
* expecting success:
git reset --hard c0 &&
test_tick &&
git merge -s recursive c1 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at 1bd44cb... initial
Updating 1bd44cb..e042178
Fast forward
file | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 3: merge -s recursive fast-forward
* expecting success:
git reset --hard c1 &&
test_tick &&
git merge -s ours c0 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at e042178... second
Already up-to-date.
* ok 4: merge -s ours up-to-date
* expecting success:
git reset --hard c0 &&
test_tick &&
git merge -s ours c1 &&
expect=$(git rev-parse c0^{tree}) &&
current=$(git rev-parse HEAD^{tree}) &&
test "$expect" = "$current"
HEAD is now at 1bd44cb... initial
Merge made by ours.
* ok 5: merge -s ours fast-forward
* expecting success:
git reset --hard c1 &&
test_tick &&
git merge -s subtree c0 &&
expect=$(git rev-parse c1) &&
current=$(git rev-parse HEAD) &&
test "$expect" = "$current"
HEAD is now at e042178... second
Already up-to-date.
* ok 6: merge -s subtree up-to-date
* passed all 6 test(s)
*** t6030-bisect-porcelain.sh ***
* expecting success:
add_line_into_file "1: Hello World" hello &&
HASH1=$(git rev-parse --verify HEAD) &&
add_line_into_file "2: A new day for git" hello &&
HASH2=$(git rev-parse --verify HEAD) &&
add_line_into_file "3: Another new day for git" hello &&
HASH3=$(git rev-parse --verify HEAD) &&
add_line_into_file "4: Ciao for now" hello &&
HASH4=$(git rev-parse --verify HEAD)
* ok 1: set up basic repo with 1 file (hello) and 4 commits
* expecting success:
git bisect reset &&
git bisect start &&
git bisect bad $HASH4 &&
git bisect next
We are not bisecting.
Warning: bisecting only with a bad commit.
Bisecting: 1 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
* ok 2: bisect starts with only one bad
* expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 || return 1
if git bisect next
then
echo Oops, should have failed.
false
else
:
fi
Switched to branch "master"
You need to give me at least one good and one bad revisions.
(You can use "git bisect bad" and "git bisect good" for that.)
* ok 3: bisect does not start with only one good
* expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect next
Already on branch "master"
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
* ok 4: bisect start with one bad and good
* expecting success:
git bisect reset &&
echo "* master" > branch.expect &&
git branch > branch.output &&
cmp branch.expect branch.output
Switched to branch "master"
* ok 5: bisect reset: back in the master branch
* expecting success:
git checkout -b other &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH3 &&
git bisect reset &&
echo " master" > branch.expect &&
echo "* other" >> branch.expect &&
git branch > branch.output &&
cmp branch.expect branch.output
Switched to a new branch "other"
Bisecting: 0 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Switched to branch "other"
* ok 6: bisect reset: back in another branch
* expecting success:
git bisect reset &&
git branch > branch.output &&
cmp branch.expect branch.output
We are not bisecting.
* ok 7: bisect reset when not bisecting
* expecting success:
git bisect reset &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH3 &&
git pack-refs --all --prune &&
git bisect next &&
git bisect reset &&
test -z "$(git for-each-ref "refs/bisect/*")" &&
test -z "$(git for-each-ref "refs/heads/bisect")"
We are not bisecting.
Bisecting: 0 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Bisecting: 0 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
Switched to branch "other"
* ok 8: bisect reset removes packed refs
* expecting success:
git bisect reset &&
git bisect start $HASH4 $HASH1 &&
git bisect skip &&
git bisect bad > my_bisect_log.txt &&
grep "$HASH2 is first bad commit" my_bisect_log.txt &&
git bisect reset
We are not bisecting.
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
7b7f204a749c3125d5224ed61ea2ae1187ad046f is first bad commit
Switched to branch "other"
* ok 9: bisect skip: successfull result
* expecting success:
git bisect start $HASH4 $HASH1 &&
git bisect skip || return 1
if git bisect skip > my_bisect_log.txt
then
echo Oops, should have failed.
false
else
test $? -eq 2 &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH1 my_bisect_log.txt &&
grep $HASH2 my_bisect_log.txt &&
grep $HASH3 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
git bisect reset
fi
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
The first bad commit could be any of:
7b7f204a749c3125d5224ed61ea2ae1187ad046f
3de952f2416b6084f557ec417709eac740c6818c
32a594a3fdac2d57cf6d02987e30eec68511498c
Switched to branch "other"
* ok 10: bisect skip: cannot tell between 3 commits
* expecting success:
git bisect start $HASH4 $HASH1 &&
git bisect skip || return 1
if git bisect good > my_bisect_log.txt
then
echo Oops, should have failed.
false
else
test $? -eq 2 &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH1 my_bisect_log.txt &&
! grep $HASH2 my_bisect_log.txt &&
grep $HASH3 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
git bisect reset
fi
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revisions left to test after this
[7b7f204a749c3125d5224ed61ea2ae1187ad046f] Add <2: A new day for git> into <hello>.
The first bad commit could be any of:
3de952f2416b6084f557ec417709eac740c6818c
32a594a3fdac2d57cf6d02987e30eec68511498c
Switched to branch "other"
* ok 11: bisect skip: cannot tell between 2 commits
* expecting success: echo "#"\!"/bin/sh" > test_script.sh &&
echo "grep Another hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start &&
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH3 is first bad commit" my_bisect_log.txt &&
git bisect reset
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
3de952f2416b6084f557ec417709eac740c6818c is first bad commit
Switched to branch "other"
* ok 12: "git bisect run" simple case
* expecting success: echo "#"\!"/bin/sh" > test_script.sh &&
echo "grep Ciao hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start $HASH4 $HASH1 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH4 is first bad commit" my_bisect_log.txt &&
git bisect reset
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c is first bad commit
Switched to branch "other"
* ok 13: "git bisect run" with more complex "git bisect start"
* expecting success:
add_line_into_file "5: Another new line." hello &&
HASH5=$(git rev-parse --verify HEAD) &&
git bisect start $HASH5 $HASH1 &&
git bisect skip &&
git bisect good > my_bisect_log.txt &&
grep "$HASH5 is first bad commit" my_bisect_log.txt &&
git bisect log > log_to_replay.txt &&
git bisect reset
Bisecting: 1 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
Bisecting: 1 revisions left to test after this
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
3082e11d3a0f2edca194c8ce1eb802256e38e75e is first bad commit
Switched to branch "other"
* ok 14: bisect skip: add line and then a new test
* expecting success:
git bisect replay log_to_replay.txt > my_bisect_log.txt &&
grep "$HASH5 is first bad commit" my_bisect_log.txt &&
git bisect reset
3082e11d3a0f2edca194c8ce1eb802256e38e75e is first bad commit
Switched to branch "other"
* ok 15: bisect skip and bisect replay
* expecting success:
add_line_into_file "6: Yet a line." hello &&
HASH6=$(git rev-parse --verify HEAD) &&
echo "#"\!"/bin/sh" > test_script.sh &&
echo "tail -1 hello | grep Ciao > /dev/null && exit 125" >> test_script.sh &&
echo "grep line hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start $HASH6 $HASH1 &&
if git bisect run ./test_script.sh > my_bisect_log.txt
then
echo Oops, should have failed.
false
else
test $? -eq 2 &&
grep "first bad commit could be any of" my_bisect_log.txt &&
! grep $HASH3 my_bisect_log.txt &&
! grep $HASH6 my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
grep $HASH5 my_bisect_log.txt
fi
Bisecting: 2 revisions left to test after this
[3de952f2416b6084f557ec417709eac740c6818c] Add <3: Another new day for git> into <hello>.
bisect run cannot continue any more
The first bad commit could be any of:
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
32a594a3fdac2d57cf6d02987e30eec68511498c
[3082e11d3a0f2edca194c8ce1eb802256e38e75e] Add <5: Another new line.> into <hello>.
3082e11d3a0f2edca194c8ce1eb802256e38e75e
* ok 16: bisect run & skip: cannot tell between 2
* expecting success:
git bisect reset &&
add_line_into_file "7: Should be the last line." hello &&
HASH7=$(git rev-parse --verify HEAD) &&
echo "#"\!"/bin/sh" > test_script.sh &&
echo "tail -1 hello | grep Ciao > /dev/null && exit 125" >> test_script.sh &&
echo "tail -1 hello | grep day > /dev/null && exit 125" >> test_script.sh &&
echo "grep Yet hello > /dev/null" >> test_script.sh &&
echo "test \$? -ne 0" >> test_script.sh &&
chmod +x test_script.sh &&
git bisect start $HASH7 $HASH1 &&
git bisect run ./test_script.sh > my_bisect_log.txt &&
grep "$HASH6 is first bad commit" my_bisect_log.txt
Switched to branch "other"
Bisecting: 2 revisions left to test after this
[32a594a3fdac2d57cf6d02987e30eec68511498c] Add <4: Ciao for now> into <hello>.
ff29dcbe6fe49a0b462bddf0691a013c12a53316 is first bad commit
* ok 17: bisect run & skip: find first bad
* expecting success:
git bisect reset &&
git checkout master^ &&
HEAD=$(git rev-parse --verify HEAD) &&
git bisect start &&
test $HEAD = $(cat .git/head-name) &&
git bisect reset &&
test $HEAD = $(git rev-parse --verify HEAD)
Switched to branch "other"
Note: moving to "master^" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 3de952f... Add <3: Another new day for git> into <hello>.
fatal: ref HEAD is not a symbolic ref
HEAD is now at 3de952f... Add <3: Another new day for git> into <hello>.
* ok 18: bisect starting with a detached HEAD
* passed all 18 test(s)
*** t6101-rev-parse-parents.sh ***
* expecting success: git rev-parse start | grep "^[0-9a-f]\{40\}$"
4b25c0a209c4f5396798a7377673618dbe2524a2
* ok 1: start is valid
* expecting success: test 4b25c0a209c4f5396798a7377673618dbe2524a2 = 4b25c0a209c4f5396798a7377673618dbe2524a2
* ok 2: start^0
* expecting success: if git rev-parse --verify start^1; then false; else :; fi
fatal: Needed a single revision
* ok 3: start^1 not valid
* expecting success: test 4b25c0a209c4f5396798a7377673618dbe2524a2 = 4b25c0a209c4f5396798a7377673618dbe2524a2
* ok 4: second^1 = second^
* expecting success: test 4b25c0a209c4f5396798a7377673618dbe2524a2 = 4b25c0a209c4f5396798a7377673618dbe2524a2
* ok 5: final^1^1^1
* expecting success: test 4b25c0a209c4f5396798a7377673618dbe2524a2 = 4b25c0a209c4f5396798a7377673618dbe2524a2
* ok 6: final^1^1^1 = final^^^
* expecting success: test fb3eab42c6822c6da52518500d7cf0e906fa5f67 = fb3eab42c6822c6da52518500d7cf0e906fa5f67
* ok 7: final^1^2
* expecting success: test fb3eab42c6822c6da52518500d7cf0e906fa5f67 != 96f1290bfcb24d476d16749e78fb68acd69d84a3
* ok 8: final^1^2 != final^1^1
* expecting success: if git rev-parse --verify final^1^3; then false; else :; fi
fatal: Needed a single revision
* ok 9: final^1^3 not valid
* expecting failure: git rev-parse --verify start2^1
fatal: Needed a single revision
* ok 10: --verify start2^1
* expecting success: git rev-parse --verify start2^0
fb3eab42c6822c6da52518500d7cf0e906fa5f67
* ok 11: --verify start2^0
* expecting success: git repack -a -d
* ok 12: repack for next test
* expecting success:
start=`git rev-parse --verify start` &&
echo $start &&
abbrv=`echo $start | sed s/.\$//` &&
echo $abbrv &&
abbrv=`git rev-parse --verify $abbrv` &&
echo $abbrv &&
test $start = $abbrv
4b25c0a209c4f5396798a7377673618dbe2524a2
4b25c0a209c4f5396798a7377673618dbe2524a
4b25c0a209c4f5396798a7377673618dbe2524a2
* ok 13: short SHA-1 works
* passed all 13 test(s)
*** t6120-describe.sh ***
* expecting success:
test_tick &&
echo one >file && git add file && git-commit -m initial &&
one=$(git rev-parse HEAD) &&
test_tick &&
echo two >file && git add file && git-commit -m second &&
two=$(git rev-parse HEAD) &&
test_tick &&
echo three >file && git add file && git-commit -m third &&
test_tick &&
echo A >file && git add file && git-commit -m A &&
test_tick &&
git-tag -a -m A A &&
test_tick &&
echo c >file && git add file && git-commit -m c &&
test_tick &&
git-tag c &&
git reset --hard $two &&
test_tick &&
echo B >side && git add side && git-commit -m B &&
test_tick &&
git-tag -a -m B B &&
test_tick &&
git-merge -m Merged c &&
merged=$(git rev-parse HEAD) &&
git reset --hard $two &&
test_tick &&
echo D >another && git add another && git-commit -m D &&
test_tick &&
git-tag -a -m D D &&
test_tick &&
echo DD >another && git commit -a -m another &&
test_tick &&
git-tag e &&
test_tick &&
echo DDD >another && git commit -a -m "yet another" &&
test_tick &&
git-merge -m Merged $merged &&
test_tick &&
echo X >file && echo X >side && git add file side &&
git-commit -m x
Created initial commit 50b0198: initial
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit 612fe8f: second
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit c48449d: third
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 4185ee1: A
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 2ad5867: c
1 files changed, 1 insertions(+), 1 deletions(-)
HEAD is now at 612fe8f... second
Created commit 3acd34f: B
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 side
Merging HEAD with c
Merging:
3acd34f B
2ad5867 c
found 1 common ancestor(s):
612fe8f second
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
HEAD is now at 612fe8f... second
Created commit 84aba8f: D
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 another
Created commit 3c80193: another
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit bb317e6: yet another
1 files changed, 1 insertions(+), 1 deletions(-)
Merging HEAD with d186fef4ddba540f4e2655b468d765fbe4603e43
Merging:
bb317e6 yet another
d186fef Merged
found 1 common ancestor(s):
612fe8f second
Merge made by recursive.
file | 2 +-
side | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
create mode 100644 side
Created commit a75b905: x
2 files changed, 2 insertions(+), 2 deletions(-)
* ok 1: setup
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 2: describe HEAD
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 3: describe HEAD^
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 4: describe HEAD^^
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 5: describe HEAD^^2
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 6: describe HEAD^^2^
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 7: describe --tags HEAD
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 8: describe --tags HEAD^
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 9: describe --tags HEAD^^
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 10: describe --tags HEAD^^2
* expecting success:
case "$R" in
$expect) echo happy ;;
*) echo "Oops - $R is not $expect";
false ;;
esac
happy
* ok 11: describe --tags HEAD^^2^
* passed all 11 test(s)
*** t6200-fmt-merge-msg.sh ***
* expecting success:
echo one >one &&
git add one &&
setdate &&
git commit -m "Initial" &&
echo uno >one &&
echo dos >two &&
git add two &&
setdate &&
git commit -a -m "Second" &&
git checkout -b left &&
echo $datestamp >one &&
setdate &&
git commit -a -m "Common #1" &&
echo $datestamp >one &&
setdate &&
git commit -a -m "Common #2" &&
git branch right &&
echo $datestamp >two &&
setdate &&
git commit -a -m "Left #3" &&
echo $datestamp >two &&
setdate &&
git commit -a -m "Left #4" &&
echo $datestamp >two &&
setdate &&
git commit -a -m "Left #5" &&
git checkout right &&
echo $datestamp >three &&
git add three &&
setdate &&
git commit -a -m "Right #3" &&
echo $datestamp >three &&
setdate &&
git commit -a -m "Right #4" &&
echo $datestamp >three &&
setdate &&
git commit -a -m "Right #5" &&
git show-branch
Created initial commit 0af87ab: Initial
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 one
Created commit 8820869: Second
2 files changed, 2 insertions(+), 1 deletions(-)
create mode 100644 two
Switched to a new branch "left"
Created commit fc5a26a: Common #1
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 4f81660: Common #2
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 44c8998: Left #3
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit d71dbaa: Left #4
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 3abc882: Left #5
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "right"
Created commit 58dfb64: Right #3
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 three
Created commit ef23258: Right #4
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 7feeef0: Right #5
1 files changed, 1 insertions(+), 1 deletions(-)
! [left] Left #5
! [master] Second
* [right] Right #5
---
* [right] Right #5
* [right^] Right #4
* [right~2] Right #3
+ [left] Left #5
+ [left^] Left #4
+ [left~2] Left #3
+ * [right~3] Common #2
+ * [right~4] Common #1
++* [master] Second
* ok 1: setup
* expecting success:
git checkout master &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
git diff actual expected
Switched to branch "master"
* ok 2: merge-msg test #1
* expecting success:
git checkout master &&
git fetch ../trash left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
git diff actual expected
Already on branch "master"
* ok 3: merge-msg test #2
* expecting success:
git config merge.summary true &&
git checkout master &&
setdate &&
git fetch . left &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
git diff actual expected
Already on branch "master"
* ok 4: merge-msg test #3
* expecting success:
git config merge.summary true &&
git checkout master &&
setdate &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
git diff actual expected
Already on branch "master"
* ok 5: merge-msg test #4
* expecting success:
git config merge.summary yes &&
git checkout master &&
setdate &&
git fetch . left right &&
git fmt-merge-msg <.git/FETCH_HEAD >actual &&
git diff actual expected
Already on branch "master"
* ok 6: merge-msg test #5
* passed all 6 test(s)
*** t6300-for-each-ref.sh ***
* expecting success:
setdate_and_increment &&
echo "Using $datestamp" > one &&
git add one &&
git commit -m "Initial" &&
setdate_and_increment &&
git tag -a -m "Tagging at $datestamp" testtag
Created initial commit 67a36f1: Initial
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 one
* ok 1: Create sample commit with known timestamp
* expecting success:
bad=
for token in \
refname objecttype objectsize objectname tree parent \
numparent object type author authorname authoremail \
authordate committer committername committeremail \
committerdate tag tagger taggername taggeremail \
taggerdate creator creatordate subject body contents
do
git for-each-ref --format="$token=%($token)" refs/heads || {
bad=$token
break
}
done
test -z "$bad"
refname=refs/heads/master
objecttype=commit
objectsize=171
objectname=67a36f10722846e891fbada1ba48ed035de75581
tree=0e51c00fcb93dffc755546f27593d511e1bdb46f
parent=
numparent=0
object=
type=
author=A U Thor <author at example.com> 1151939924 +0200
authorname=A U Thor
authoremail=<author at example.com>
authordate=Mon Jul 3 17:18:44 2006 +0200
committer=C O Mitter <committer at example.com> 1151939923 +0200
committername=C O Mitter
committeremail=<committer at example.com>
committerdate=Mon Jul 3 17:18:43 2006 +0200
tag=
tagger=
taggername=
taggeremail=
taggerdate=
creator=C O Mitter <committer at example.com> 1151939923 +0200
creatordate=Mon Jul 3 17:18:43 2006 +0200
subject=Initial
body=
contents=Initial
* ok 2: Check atom names are valid
* expecting failure:
git-for-each-ref --format="%(INVALID)" refs/heads
fatal: unknown field name: INVALID
* ok 3: Check invalid atoms names are errors
* expecting success:
git-for-each-ref --format="%(authordate)" refs/heads &&
git-for-each-ref --format="%(authordate:default) %(authordate)" refs/heads &&
git-for-each-ref --format="%(authordate) %(authordate:default)" refs/heads &&
git-for-each-ref --format="%(authordate:default) %(authordate:default)" refs/heads
Mon Jul 3 17:18:44 2006 +0200
Mon Jul 3 17:18:44 2006 +0200 Mon Jul 3 17:18:44 2006 +0200
Mon Jul 3 17:18:44 2006 +0200 Mon Jul 3 17:18:44 2006 +0200
Mon Jul 3 17:18:44 2006 +0200 Mon Jul 3 17:18:44 2006 +0200
* ok 4: Check format specifiers are ignored in naming date atoms
* expecting success:
git-for-each-ref --format="%(authordate:default)" refs/heads &&
git-for-each-ref --format="%(authordate:relative)" refs/heads &&
git-for-each-ref --format="%(authordate:short)" refs/heads &&
git-for-each-ref --format="%(authordate:local)" refs/heads &&
git-for-each-ref --format="%(authordate:iso8601)" refs/heads &&
git-for-each-ref --format="%(authordate:rfc2822)" refs/heads
Mon Jul 3 17:18:44 2006 +0200
Mon Jul 3 17:18:44 2006 +0200
2006-07-03
Mon Jul 3 15:18:44 2006
2006-07-03 17:18:44 +0200
Mon, 3 Jul 2006 17:18:44 +0200
* ok 5: Check valid format specifiers for date fields
* expecting failure:
git-for-each-ref --format="%(authordate:INVALID)" refs/heads
fatal: unknown date format INVALID
* ok 6: Check invalid format specifiers are errors
* expecting success:
(git for-each-ref --shell --format="%(refname) %(committerdate) %(authordate)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate)" refs/tags) >actual &&
git diff expected actual
* ok 7: Check unformatted date fields output
* expecting success:
f=default &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual &&
git diff expected actual
* ok 8: Check format "default" formatted date fields output
* expecting success:
f=relative &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual
* ok 9: Check format "relative" date fields output
* expecting success:
f=short &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual &&
git diff expected actual
* ok 10: Check format "short" date fields output
* expecting success:
f=local &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual &&
git diff expected actual
* ok 11: Check format "local" date fields output
* expecting success:
f=iso8601 &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual &&
git diff expected actual
* ok 12: Check format "iso8601" date fields output
* expecting success:
f=rfc2822 &&
(git for-each-ref --shell --format="%(refname) %(committerdate:$f) %(authordate:$f)" refs/heads &&
git for-each-ref --shell --format="%(refname) %(taggerdate:$f)" refs/tags) >actual &&
git diff expected actual
* ok 13: Check format "rfc2822" date fields output
* expecting success:
git-for-each-ref --format="%(refname)" --sort=refname >actual &&
git diff expected actual
* ok 14: Verify ascending sort
* expecting success:
git-for-each-ref --format="%(refname)" --sort=-refname >actual &&
git diff expected actual
* ok 15: Verify descending sort
* expecting success:
git for-each-ref --shell --format="%(refname)" >actual &&
git diff expected actual
* ok 16: Quoting style: shell
* expecting success:
git for-each-ref --perl --format="%(refname)" >actual &&
git diff expected actual
* ok 17: Quoting style: perl
* expecting success:
git for-each-ref --python --format="%(refname)" >actual &&
git diff expected actual
* ok 18: Quoting style: python
* expecting success:
git for-each-ref --tcl --format="%(refname)" >actual &&
git diff expected actual
* ok 19: Quoting style: tcl
* expecting success:
git for-each-ref --perl --shell 2>&1 | (read line &&
case $line in
"error: more than one quoting style"*) : happy;;
*) false
esac)
* ok 20: more than one quoting style: --perl --shell
* expecting success:
git for-each-ref -s --python 2>&1 | (read line &&
case $line in
"error: more than one quoting style"*) : happy;;
*) false
esac)
* ok 21: more than one quoting style: -s --python
* expecting success:
git for-each-ref --python --tcl 2>&1 | (read line &&
case $line in
"error: more than one quoting style"*) : happy;;
*) false
esac)
* ok 22: more than one quoting style: --python --tcl
* expecting success:
git for-each-ref --tcl --perl 2>&1 | (read line &&
case $line in
"error: more than one quoting style"*) : happy;;
*) false
esac)
* ok 23: more than one quoting style: --tcl --perl
* passed all 23 test(s)
*** t7001-mv.sh ***
* expecting success: mkdir path0 path1 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
git-commit -m add -a
Created initial commit b9d3b8f: add
1 files changed, 361 insertions(+), 0 deletions(-)
create mode 100644 path0/COPYING
* ok 1: prepare reference tree
* expecting success: cd path0 && git mv COPYING ../path1/COPYING
* ok 2: moving the file out of subdirectory
* expecting success: cd .. && git-commit -m move-out -a
Created commit 7a05d82: move-out
1 files changed, 0 insertions(+), 0 deletions(-)
rename {path0 => path1}/COPYING (100%)
* ok 3: commiting the change
* expecting success: git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path0/COPYING..*path1/COPYING"
R100 path0/COPYING path1/COPYING
* ok 4: checking the commit
* expecting success: cd path0 && git mv ../path1/COPYING COPYING
* ok 5: moving the file back into subdirectory
* expecting success: cd .. && git-commit -m move-in -a
Created commit 9b19761: move-in
1 files changed, 0 insertions(+), 0 deletions(-)
rename {path1 => path0}/COPYING (100%)
* ok 6: commiting the change
* expecting success: git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path1/COPYING..*path0/COPYING"
R100 path1/COPYING path0/COPYING
* ok 7: checking the commit
* expecting success: cp ../../README path0/README &&
git add path0/README &&
git-commit -m add2 -a
Created commit ec9ac18: add2
1 files changed, 46 insertions(+), 0 deletions(-)
create mode 100644 path0/README
* ok 8: adding another file
* expecting success: git mv path0 path2
* ok 9: moving whole subdirectory
* expecting success: git-commit -m dir-move -a
Created commit 5b0b73b: dir-move
2 files changed, 0 insertions(+), 0 deletions(-)
rename {path0 => path2}/COPYING (100%)
rename {path0 => path2}/README (100%)
* ok 10: commiting the change
* expecting success: git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path0/COPYING..*path2/COPYING" &&
git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path0/README..*path2/README"
R100 path0/COPYING path2/COPYING
R100 path0/README path2/README
* ok 11: checking the commit
* expecting success: git mv path2/COPYING path2/COPYING-renamed
* ok 12: succeed when source is a prefix of destination
* expecting success: git mv path2 path1
* ok 13: moving whole subdirectory into subdirectory
* expecting success: git-commit -m dir-move -a
Created commit 8dec644: dir-move
2 files changed, 0 insertions(+), 0 deletions(-)
rename path2/COPYING => path1/path2/COPYING-renamed (100%)
rename {path2 => path1/path2}/README (100%)
* ok 14: commiting the change
* expecting success: git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path2/COPYING..*path1/path2/COPYING" &&
git diff-tree -r -M --name-status HEAD^ HEAD | \
grep "^R100..*path2/README..*path1/path2/README"
R100 path2/COPYING path1/path2/COPYING-renamed
R100 path2/README path1/path2/README
* ok 15: checking the commit
* expecting failure: mkdir path0 && mkdir path0/path2 && git mv path2 path0
fatal: bad source, source=path2, destination=path0/path2
* ok 16: do not move directory over existing directory
* expecting success: git mv path1/path2/ .
* ok 17: move into "."
* expecting success:
rm -fr .git papers partA &&
git init &&
mkdir -p papers/unsorted papers/all-papers partA &&
echo a > papers/unsorted/Thesis.pdf &&
echo b > partA/outline.txt &&
echo c > papers/unsorted/_another &&
git add papers partA &&
T1=`git write-tree` &&
git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf &&
T=`git write-tree` &&
git ls-tree -r $T | grep partA/outline.txt || {
git ls-tree -r $T
(exit 1)
}
Initialized empty Git repository in .git/
100644 blob 61780798228d17af2d34fce4cfbdf35556832472 partA/outline.txt
* ok 18: Michael Cassar's test case
* expecting success:
rm -fr .git &&
git init &&
mkdir ab &&
date >ab.c &&
date >ab/d &&
git add ab.c ab &&
git commit -m initial &&
git mv ab a
Initialized empty Git repository in .git/
Created initial commit 42e2437: initial
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 ab.c
create mode 100644 ab/d
* ok 19: Sergey Vlasov's test case
* passed all 19 test(s)
*** t7002-grep.sh ***
* expecting success:
{
echo foo mmap bar
echo foo_mmap bar
echo foo_mmap bar mmap
echo foo mmap bar_mmap
echo foo_mmap bar mmap baz
} >file &&
echo x x xx x >x &&
echo y yy >y &&
echo zzz > z &&
mkdir t &&
echo test >t/t &&
git add file x y z t/t &&
git commit -m initial
Created initial commit 1e4011b: initial
5 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 file
create mode 100644 t/t
create mode 100644 x
create mode 100644 y
create mode 100644 z
* ok 1: setup
* expecting success:
{
echo ${HC}file:1:foo mmap bar
echo ${HC}file:3:foo_mmap bar mmap
echo ${HC}file:4:foo mmap bar_mmap
echo ${HC}file:5:foo_mmap bar mmap baz
} >expected &&
git grep -n -w -e mmap $H >actual &&
diff expected actual
* ok 2: grep -w HEAD
* expecting success:
{
echo ${HC}x:1:x x xx x
} >expected &&
git grep -n -w -e "x xx* x" $H >actual &&
diff expected actual
* ok 3: grep -w HEAD (x)
* expecting success:
{
echo ${HC}y:1:y yy
} >expected &&
git grep -n -w -e "^y" $H >actual &&
diff expected actual
* ok 4: grep -w HEAD (y-1)
* expecting success:
: >expected &&
if git grep -n -w -e "^y y" $H >actual
then
echo should not have matched
cat actual
false
else
diff expected actual
fi
* ok 5: grep -w HEAD (y-2)
* expecting success:
: >expected &&
if git grep -n -w -e "^z" $H >actual
then
echo should not have matched
cat actual
false
else
diff expected actual
fi
* ok 6: grep -w HEAD (z)
* expecting success:
echo "${HC}t/t:1:test" >expected &&
git grep -n -e test $H >actual &&
diff expected actual
* ok 7: grep HEAD (t-1)
* expecting success:
echo "${HC}t:1:test" >expected &&
(
cd t &&
git grep -n -e test $H
) >actual &&
diff expected actual
* ok 8: grep HEAD (t-2)
* expecting success:
echo "${HC}t/t:1:test" >expected &&
(
cd t &&
git grep --full-name -n -e test $H
) >actual &&
diff expected actual
* ok 9: grep HEAD (t-3)
* expecting failure:
git grep -c test $H | grep -q "/dev/null"
* ok 10: grep -c HEAD (no /dev/null)
* expecting success:
{
echo ${HC}file:1:foo mmap bar
echo ${HC}file:3:foo_mmap bar mmap
echo ${HC}file:4:foo mmap bar_mmap
echo ${HC}file:5:foo_mmap bar mmap baz
} >expected &&
git grep -n -w -e mmap $H >actual &&
diff expected actual
* ok 11: grep -w in working tree
* expecting success:
{
echo ${HC}x:1:x x xx x
} >expected &&
git grep -n -w -e "x xx* x" $H >actual &&
diff expected actual
* ok 12: grep -w in working tree (x)
* expecting success:
{
echo ${HC}y:1:y yy
} >expected &&
git grep -n -w -e "^y" $H >actual &&
diff expected actual
* ok 13: grep -w in working tree (y-1)
* expecting success:
: >expected &&
if git grep -n -w -e "^y y" $H >actual
then
echo should not have matched
cat actual
false
else
diff expected actual
fi
* ok 14: grep -w in working tree (y-2)
* expecting success:
: >expected &&
if git grep -n -w -e "^z" $H >actual
then
echo should not have matched
cat actual
false
else
diff expected actual
fi
* ok 15: grep -w in working tree (z)
* expecting success:
echo "${HC}t/t:1:test" >expected &&
git grep -n -e test $H >actual &&
diff expected actual
* ok 16: grep in working tree (t-1)
* expecting success:
echo "${HC}t:1:test" >expected &&
(
cd t &&
git grep -n -e test $H
) >actual &&
diff expected actual
* ok 17: grep in working tree (t-2)
* expecting success:
echo "${HC}t/t:1:test" >expected &&
(
cd t &&
git grep --full-name -n -e test $H
) >actual &&
diff expected actual
* ok 18: grep in working tree (t-3)
* expecting failure:
git grep -c test $H | grep -q "/dev/null"
* ok 19: grep -c in working tree (no /dev/null)
* passed all 19 test(s)
*** t7003-filter-branch.sh ***
* expecting success:
make_commit A
make_commit B
git checkout -b branch B
make_commit D
make_commit E
git checkout master
make_commit C
git checkout branch
git merge C
git tag F
make_commit G
make_commit H
Created initial commit b8615ee: A
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Created commit e494265: B
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 b
Switched to a new branch "branch"
Created commit 30b6a61: D
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 d
Created commit 673375c: E
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 e
Switched to branch "master"
Created commit adf22bc: C
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 c
Switched to branch "branch"
Merging HEAD with C
Merging:
673375c E
adf22bc C
found 1 common ancestor(s):
e494265 B
Merge made by recursive.
c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 c
Created commit 571eb6b: G
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 g
Created commit f92ed6d: H
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 h
* ok 1: setup
* expecting success:
git-filter-branch branch
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/8)
Rewrite e49426590ef82fc881d8e45a88320877a6912f47 (2/8)
Rewrite 30b6a61f22304a33aa48d6f9cdb5eff822129e23 (3/8)
Rewrite 673375c8afd934b26fb0bae9fe9a2c7e9d61f8ef (4/8)
Rewrite adf22bc76bf9cd23c698c3306778ce201ed89eac (5/8)
Rewrite aae999c5bdd421bc47bf9dae58195feb6c9d4a81 (6/8)
Rewrite 571eb6bcda8ae6f95409c6ca940dfe3910ea000c (7/8)
Rewrite f92ed6d7dbfccd24f54e5fb979057d0c1f5ff342 (8/8)
WARNING: Ref 'refs/heads/branch' is unchanged
* ok 2: rewrite identically
* expecting success:
test $H = $(git rev-parse HEAD)
* ok 3: result is really identical
* expecting success:
git-filter-branch -f --tree-filter "mv d doh || :" HEAD
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/8)mv: cannot stat `d': No such file or directory
Rewrite e49426590ef82fc881d8e45a88320877a6912f47 (2/8)mv: cannot stat `d': No such file or directory
Rewrite 30b6a61f22304a33aa48d6f9cdb5eff822129e23 (3/8)
Rewrite 673375c8afd934b26fb0bae9fe9a2c7e9d61f8ef (4/8)
Rewrite adf22bc76bf9cd23c698c3306778ce201ed89eac (5/8)mv: cannot stat `d': No such file or directory
Rewrite aae999c5bdd421bc47bf9dae58195feb6c9d4a81 (6/8)
Rewrite 571eb6bcda8ae6f95409c6ca940dfe3910ea000c (7/8)
Rewrite f92ed6d7dbfccd24f54e5fb979057d0c1f5ff342 (8/8)
Ref 'refs/heads/branch' was rewritten
* ok 4: rewrite, renaming a specific file
* expecting success:
test d = $(git show HEAD:doh) &&
test -f doh &&
test d = $(cat doh)
* ok 5: test that the file was renamed
* expecting success:
git branch modD oldD &&
git-filter-branch -f --tree-filter "mv b boh || :" D..modD
Rewrite 165cf4d7e0a8c674d4d7434671ee0069e012ecec (1/1)
Ref 'refs/heads/modD' was rewritten
* ok 6: rewrite one branch, keeping a side branch
* expecting success:
test "$(git merge-base modD D)" = "$(git rev-parse B)"
* ok 7: common ancestor is still common (unchanged)
* expecting success:
mkdir subdir &&
touch subdir/new &&
git add subdir/new &&
test_tick &&
git commit -m "subdir" &&
echo H > a &&
test_tick &&
git commit -m "not subdir" a &&
echo A > subdir/new &&
test_tick &&
git commit -m "again subdir" subdir/new &&
git rm a &&
test_tick &&
git commit -m "again not subdir" &&
git branch sub &&
git-filter-branch -f --subdirectory-filter subdir refs/heads/sub
Created commit 35ad35f: subdir
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 subdir/new
Created commit 9f10b39: not subdir
1 files changed, 1 insertions(+), 1 deletions(-)
Created commit 6e91bd4: again subdir
1 files changed, 1 insertions(+), 0 deletions(-)
rm 'a'
Created commit 8028e72: again not subdir
1 files changed, 0 insertions(+), 1 deletions(-)
delete mode 100644 a
Rewrite 35ad35f84ba88ef965f26b379a44ec55f51078b2 (1/2)
Rewrite 6e91bd41e3351a55274c235111f7e6b9ecb6c7b3 (2/2)
Ref 'refs/heads/sub' was rewritten
* ok 8: filter subdirectory only
* expecting success:
test 2 = $(git rev-list sub | wc -l) &&
git show sub:new &&
! git show sub:subdir
A
fatal: ambiguous argument 'sub:subdir': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
* ok 9: subdirectory filter result looks okay
* expecting success:
git checkout master &&
mkdir subdir &&
echo A > subdir/new &&
git add subdir/new &&
test_tick &&
git commit -m "subdir on master" subdir/new &&
git rm a &&
test_tick &&
git commit -m "again subdir on master" &&
git merge branch &&
git branch sub-master &&
git-filter-branch -f --subdirectory-filter subdir sub-master
Switched to branch "master"
Created commit 4f717f3: subdir on master
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 subdir/new
rm 'a'
Created commit f9b75c2: again subdir on master
1 files changed, 0 insertions(+), 1 deletions(-)
delete mode 100644 a
Merging HEAD with branch
Merging:
f9b75c2 again subdir on master
8028e72 again not subdir
found 1 common ancestor(s):
adf22bc C
Merge made by recursive.
doh | 1 +
e | 1 +
g | 1 +
h | 1 +
4 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 doh
create mode 100644 e
create mode 100644 g
create mode 100644 h
Rewrite 4f717f3e3e748b4db5c202ea3dcaa1da914c8090 (1/4)
Rewrite 35ad35f84ba88ef965f26b379a44ec55f51078b2 (2/4)
Rewrite 6e91bd41e3351a55274c235111f7e6b9ecb6c7b3 (3/4)
Rewrite 1f2dc995fba53f638328e421d4a768d3fa1aefeb (4/4)
Ref 'refs/heads/sub-master' was rewritten
* ok 10: setup and filter history that requires --full-history
* expecting success:
test 3 = $(git rev-list -1 --parents sub-master | wc -w) &&
git show sub-master^:new &&
git show sub-master^2:new &&
! git show sub:subdir
A
A
fatal: ambiguous argument 'sub:subdir': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
* ok 11: subdirectory filter result looks okay
* expecting success:
git branch directorymoved &&
git-filter-branch -f --index-filter \
"git ls-files -s | sed \"s-\t-&newsubdir/-\" |
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv \$GIT_INDEX_FILE.new \$GIT_INDEX_FILE" directorymoved &&
test -z "$(git diff HEAD directorymoved:newsubdir)"
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/15)
Rewrite e49426590ef82fc881d8e45a88320877a6912f47 (2/15)
Rewrite adf22bc76bf9cd23c698c3306778ce201ed89eac (3/15)
Rewrite 4f717f3e3e748b4db5c202ea3dcaa1da914c8090 (4/15)
Rewrite f9b75c2aa1b1b51dda5f07df58ab73fb59e3e453 (5/15)
Rewrite 165cf4d7e0a8c674d4d7434671ee0069e012ecec (6/15)
Rewrite 519756fdbf0b16b296cc7ebbe5fdae6fb41e35be (7/15)
Rewrite 914e97c7d9f2e069234d9e8080f0064c1600b502 (8/15)
Rewrite d8932f7518ba479d85c5e8e9abbf84930c6a56d4 (9/15)
Rewrite f1c2aadd0040465ea8e30e80da0f149731d4feab (10/15)
Rewrite 35ad35f84ba88ef965f26b379a44ec55f51078b2 (11/15)
Rewrite 9f10b3936c63c813c44336d53a4d596fcfc85738 (12/15)
Rewrite 6e91bd41e3351a55274c235111f7e6b9ecb6c7b3 (13/15)
Rewrite 8028e721bbd6ab3f40d8483b9da7e4315577d435 (14/15)
Rewrite 1f2dc995fba53f638328e421d4a768d3fa1aefeb (15/15)
Ref 'refs/heads/directorymoved' was rewritten
* ok 12: use index-filter to move into a subdirectory
* expecting success:
old=$(git rev-parse HEAD) &&
! git-filter-branch -f --msg-filter false HEAD &&
test $old = $(git rev-parse HEAD) &&
rm -rf .git-rewrite
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/15)msg filter failed: false
* ok 13: stops when msg filter fails
* expecting success:
: > i &&
git add i &&
test_tick &&
GIT_AUTHOR_NAME="B V Uips" git commit -m bvuips &&
git branch preserved-author &&
git-filter-branch -f --msg-filter "cat; \
test \$GIT_COMMIT != $(git rev-parse master) || \
echo Hallo" \
preserved-author &&
test 1 = $(git rev-list --author="B V Uips" preserved-author | wc -l)
Created commit 9bec0c5: bvuips
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 i
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/16)
Rewrite e49426590ef82fc881d8e45a88320877a6912f47 (2/16)
Rewrite adf22bc76bf9cd23c698c3306778ce201ed89eac (3/16)
Rewrite 4f717f3e3e748b4db5c202ea3dcaa1da914c8090 (4/16)
Rewrite f9b75c2aa1b1b51dda5f07df58ab73fb59e3e453 (5/16)
Rewrite 165cf4d7e0a8c674d4d7434671ee0069e012ecec (6/16)
Rewrite 519756fdbf0b16b296cc7ebbe5fdae6fb41e35be (7/16)
Rewrite 914e97c7d9f2e069234d9e8080f0064c1600b502 (8/16)
Rewrite d8932f7518ba479d85c5e8e9abbf84930c6a56d4 (9/16)
Rewrite f1c2aadd0040465ea8e30e80da0f149731d4feab (10/16)
Rewrite 35ad35f84ba88ef965f26b379a44ec55f51078b2 (11/16)
Rewrite 9f10b3936c63c813c44336d53a4d596fcfc85738 (12/16)
Rewrite 6e91bd41e3351a55274c235111f7e6b9ecb6c7b3 (13/16)
Rewrite 8028e721bbd6ab3f40d8483b9da7e4315577d435 (14/16)
Rewrite 1f2dc995fba53f638328e421d4a768d3fa1aefeb (15/16)
Rewrite 9bec0c5ab702aee056e2ca99e03211fe22d5074b (16/16)
Ref 'refs/heads/preserved-author' was rewritten
* ok 14: author information is preserved
* expecting success:
echo i > i &&
test_tick &&
git commit -m i i &&
git branch removed-author &&
git-filter-branch -f --commit-filter "\
if [ \"\$GIT_AUTHOR_NAME\" = \"B V Uips\" ];\
then\
skip_commit \"\$@\";
else\
git commit-tree \"\$@\";\
fi" removed-author &&
cnt1=$(git rev-list master | wc -l) &&
cnt2=$(git rev-list removed-author | wc -l) &&
test $cnt1 -eq $(($cnt2 + 1)) &&
test 0 = $(git rev-list --author="B V Uips" removed-author | wc -l)
Created commit 37da456: i
1 files changed, 1 insertions(+), 0 deletions(-)
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/17)
Rewrite e49426590ef82fc881d8e45a88320877a6912f47 (2/17)
Rewrite adf22bc76bf9cd23c698c3306778ce201ed89eac (3/17)
Rewrite 4f717f3e3e748b4db5c202ea3dcaa1da914c8090 (4/17)
Rewrite f9b75c2aa1b1b51dda5f07df58ab73fb59e3e453 (5/17)
Rewrite 165cf4d7e0a8c674d4d7434671ee0069e012ecec (6/17)
Rewrite 519756fdbf0b16b296cc7ebbe5fdae6fb41e35be (7/17)
Rewrite 914e97c7d9f2e069234d9e8080f0064c1600b502 (8/17)
Rewrite d8932f7518ba479d85c5e8e9abbf84930c6a56d4 (9/17)
Rewrite f1c2aadd0040465ea8e30e80da0f149731d4feab (10/17)
Rewrite 35ad35f84ba88ef965f26b379a44ec55f51078b2 (11/17)
Rewrite 9f10b3936c63c813c44336d53a4d596fcfc85738 (12/17)
Rewrite 6e91bd41e3351a55274c235111f7e6b9ecb6c7b3 (13/17)
Rewrite 8028e721bbd6ab3f40d8483b9da7e4315577d435 (14/17)
Rewrite 1f2dc995fba53f638328e421d4a768d3fa1aefeb (15/17)
Rewrite 9bec0c5ab702aee056e2ca99e03211fe22d5074b (16/17)
Rewrite 37da45684db51da07db2ec35a3120fd71e8481df (17/17)
Ref 'refs/heads/removed-author' was rewritten
* ok 15: remove a certain author's commits
* expecting success:
! git filter-branch -f master xy-problem &&
! git filter-branch -f HEAD^
fatal: ambiguous argument 'xy-problem': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
Could not get the commits
Which ref do you want to rewrite?
* ok 16: barf on invalid name
* expecting success:
git filter-branch -f --commit-filter "\
parent=\$(git rev-parse \$GIT_COMMIT^) &&
mapped=\$(map \$parent) &&
actual=\$(echo \"\$@\" | sed \"s/^.*-p //\") &&
test \$mapped = \$actual &&
git commit-tree \"\$@\";" master~2..master &&
git rev-parse --verify master
Rewrite 9bec0c5ab702aee056e2ca99e03211fe22d5074b (1/2)
Rewrite 37da45684db51da07db2ec35a3120fd71e8481df (2/2)
WARNING: Ref 'refs/heads/master' is unchanged
37da45684db51da07db2ec35a3120fd71e8481df
* ok 17: "map" works in commit filter
* expecting success:
git checkout -b rerere A &&
mkdir foo &&
name="ããã" &&
>foo/$name &&
git add foo &&
git commit -m "Adding a file" &&
git filter-branch --tree-filter "rm -fr foo" &&
! git ls-files --error-unmatch "foo/$name" &&
test $(git rev-parse --verify rerere) != $(git rev-parse --verify A)
Switched to a new branch "rerere"
Created commit 43e0ff6: Adding a file
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 "foo/\343\202\214\343\202\214\343\202\214"
Rewrite b8615eea5fc6bb0efa58ba37cf6ef9242d64a971 (1/2)
Rewrite 43e0ff69d5c01678e684fa4ead2264acc4ab0c7f (2/2)
Ref 'refs/heads/rerere' was rewritten
error: pathspec 'foo/ããã' did not match any file(s) known to git.
Did you forget to 'git add'?
* ok 18: Name needing quotes
* passed all 18 test(s)
*** t7004-tag.sh ***
* expecting success:
git tag -l &&
git tag
* ok 1: listing all tags in an empty tree should succeed
* expecting success:
test `git-tag -l | wc -l` -eq 0 &&
test `git-tag | wc -l` -eq 0
* ok 2: listing all tags in an empty tree should output nothing
* expecting failure: tag_exists mytag
* ok 3: looking for a tag in an empty tree should fail
* expecting success:
! git-tag mynotag &&
! tag_exists mynotag
fatal: Failed to resolve 'HEAD' as a valid ref.
* ok 4: creating a tag in an empty tree should fail
* expecting success:
! git-tag mytaghead HEAD &&
! tag_exists mytaghead
fatal: Failed to resolve 'HEAD' as a valid ref.
* ok 5: creating a tag for HEAD in an empty tree should fail
* expecting success:
! git-tag mytagnorev aaaaaaaaaaa &&
! tag_exists mytagnorev
fatal: Failed to resolve 'aaaaaaaaaaa' as a valid ref.
* ok 6: creating a tag for an unknown revision should fail
* expecting success:
test_tick &&
echo foo >foo &&
git add foo &&
git commit -m Foo &&
git tag mytag
Created initial commit 86e17e4: Foo
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
* ok 7: creating a tag using default HEAD should succeed
* expecting success:
git-tag -l &&
git-tag
mytag
mytag
* ok 8: listing all tags if one exists should succeed
* expecting success:
test `git-tag -l` = mytag &&
test `git-tag` = mytag
* ok 9: listing all tags if one exists should output that tag
* expecting success: git-tag -l mytag
mytag
* ok 10: listing a tag using a matching pattern should succeed
* expecting success: test `git-tag -l mytag` = mytag
* ok 11: listing a tag using a matching pattern should output that tag
* expecting success: git-tag -l xxx
* ok 12: listing tags using a non-matching pattern should suceed
* expecting success: test `git-tag -l xxx | wc -l` -eq 0
* ok 13: listing tags using a non-matching pattern should output nothing
* expecting failure: git tag mytag
fatal: tag 'mytag' already exists
* ok 14: trying to create a tag with the name of one existing should fail
* expecting success:
test `git-tag -l | wc -l` -eq 1 &&
! git tag "" &&
! git tag .othertag &&
! git tag "other tag" &&
! git tag "othertag^" &&
! git tag "other~tag" &&
test `git-tag -l | wc -l` -eq 1
fatal: '' is not a valid tag name.
fatal: '.othertag' is not a valid tag name.
fatal: 'other tag' is not a valid tag name.
fatal: 'othertag^' is not a valid tag name.
fatal: 'other~tag' is not a valid tag name.
* ok 15: trying to create a tag with a non-valid name should fail
* expecting success:
git tag myhead HEAD &&
tag_exists myhead
* ok 16: creating a tag using HEAD directly should succeed
* expecting success:
! tag_exists unknown-tag &&
! git-tag -d unknown-tag
error: tag 'unknown-tag' not found.
* ok 17: trying to delete an unknown tag should fail
* expecting success:
git tag -l > actual && git diff expect actual &&
git-tag -d &&
git tag -l > actual && git diff expect actual
* ok 18: trying to delete tags without params should succeed and do nothing
* expecting success:
tag_exists mytag &&
tag_exists myhead &&
git-tag -d mytag myhead &&
! tag_exists mytag &&
! tag_exists myhead
Deleted tag 'mytag'
Deleted tag 'myhead'
* ok 19: deleting two existing tags in one command should succeed
* expecting success:
! tag_exists mytag &&
git-tag mytag &&
tag_exists mytag
* ok 20: creating a tag with the name of another deleted one should succeed
* expecting success:
tag_exists mytag &&
! tag_exists myhead &&
! git-tag -d mytag anothertag &&
! tag_exists mytag &&
! tag_exists myhead
error: tag 'anothertag' not found.
Deleted tag 'mytag'
* ok 21: trying to delete two tags, existing and not, should fail in the 2nd
* expecting failure: git-tag -d mytag
error: tag 'mytag' not found.
* ok 22: trying to delete an already deleted tag should fail
* expecting success:
git tag v1.0.1 &&
git tag t211 &&
git tag aa1 &&
git tag v0.2.1 &&
git tag v1.1.3 &&
git tag cba &&
git tag a1 &&
git tag v1.0 &&
git tag t210 &&
git tag -l > actual &&
git diff expect actual &&
git tag > actual &&
git diff expect actual
* ok 23: listing all tags should print them ordered
* expecting success:
git-tag -l "*a*" > actual &&
git diff expect actual
* ok 24: listing tags with substring as pattern must print those matching
* expecting success:
git-tag -l "*.1" > actual &&
git diff expect actual
* ok 25: listing tags with a suffix as pattern must print those matching
* expecting success:
git-tag -l "t21*" > actual &&
git diff expect actual
* ok 26: listing tags with a prefix as pattern must print those matching
* expecting success:
git-tag -l a1 > actual &&
git diff expect actual
* ok 27: listing tags using a name as pattern must print that one matching
* expecting success:
git-tag -l v1.0 > actual &&
git diff expect actual
* ok 28: listing tags using a name as pattern must print that one matching
* expecting success:
git-tag -l "v1.?.?" > actual &&
git diff expect actual
* ok 29: listing tags with ? in the pattern should print those matching
* expecting success:
git-tag -l "v.*" > actual &&
git diff expect actual
* ok 30: listing tags using v.* should print nothing because none have v.
* expecting success:
git-tag -l "v*" > actual &&
git diff expect actual
* ok 31: listing tags using v* should print only those having v
* expecting success:
git-tag non-annotated-tag &&
test $(git cat-file -t non-annotated-tag) = commit &&
test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
* ok 32: a non-annotated tag created without parameters should point to HEAD
* expecting failure: git-tag -v unknown-tag
error: tag 'unknown-tag' not found.
* ok 33: trying to verify an unknown tag should fail
* expecting failure: git-tag -v non-annotated-tag
error: 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b: cannot verify a non-tag object of type commit.
error: could not verify the tag 'non-annotated-tag'
* ok 34: trying to verify a non-annotated and non-signed tag should fail
* expecting failure: git-tag -v unknown-tag1 non-annotated-tag unknown-tag2
error: tag 'unknown-tag1' not found.
error: 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b: cannot verify a non-tag object of type commit.
error: could not verify the tag 'non-annotated-tag'
error: tag 'unknown-tag2' not found.
* ok 35: trying to verify many non-annotated or unknown tags, should fail
* expecting success:
git-tag -m "A message" annotated-tag &&
get_tag_msg annotated-tag >actual &&
git diff expect actual
* ok 36: creating an annotated tag with -m message should succeed
* expecting success:
git-tag -F msgfile file-annotated-tag &&
get_tag_msg file-annotated-tag >actual &&
git diff expect actual
* ok 37: creating an annotated tag with -F messagefile should succeed
* expecting success:
git-tag -F - stdin-annotated-tag <inputmsg &&
get_tag_msg stdin-annotated-tag >actual &&
git diff expect actual
* ok 38: creating an annotated tag with -F - should succeed
* expecting success:
! test -f nonexistingfile &&
! tag_exists notag &&
! git-tag -F nonexistingfile notag &&
! tag_exists notag
fatal: could not open or read 'nonexistingfile': No such file or directory
* ok 39: trying to create a tag with a non-existing -F file should fail
* expecting success:
echo "message file 1" >msgfile1 &&
echo "message file 2" >msgfile2 &&
! tag_exists msgtag &&
! git-tag -m "message 1" -F msgfile1 msgtag &&
! tag_exists msgtag &&
! git-tag -F msgfile1 -m "message 1" msgtag &&
! tag_exists msgtag &&
! git-tag -m "message 1" -F msgfile1 -m "message 2" msgtag &&
! tag_exists msgtag
fatal: only one -F or -m option is allowed.
fatal: only one -F or -m option is allowed.
fatal: only one -F or -m option is allowed.
* ok 40: trying to create tags giving both -m or -F options should fail
* expecting success:
git-tag -m "" empty-annotated-tag &&
get_tag_msg empty-annotated-tag >actual &&
git diff expect actual
* ok 41: creating a tag with an empty -m message should succeed
* expecting success:
git-tag -F emptyfile emptyfile-annotated-tag &&
get_tag_msg emptyfile-annotated-tag >actual &&
git diff expect actual
* ok 42: creating a tag with an empty -F messagefile should succeed
* expecting success:
git-tag -F blanksfile blanks-annotated-tag &&
get_tag_msg blanks-annotated-tag >actual &&
git diff expect actual
* ok 43: extra blanks in the message for an annotated tag should be removed
* expecting success:
git-tag -m " " blank-annotated-tag &&
get_tag_msg blank-annotated-tag >actual &&
git diff expect actual
* ok 44: creating a tag with blank -m message with spaces should succeed
* expecting success:
git-tag -F blankfile blankfile-annotated-tag &&
get_tag_msg blankfile-annotated-tag >actual &&
git diff expect actual
* ok 45: creating a tag with blank -F messagefile with spaces should succeed
* expecting success:
git-tag -F blanknonlfile blanknonlfile-annotated-tag &&
get_tag_msg blanknonlfile-annotated-tag >actual &&
git diff expect actual
* ok 46: creating a tag with -F file of spaces and no newline should succeed
* expecting success:
git-tag -F commentsfile comments-annotated-tag &&
get_tag_msg comments-annotated-tag >actual &&
git diff expect actual
* ok 47: creating a tag using a -F messagefile with #comments should succeed
* expecting success:
git-tag -m "#comment" comment-annotated-tag &&
get_tag_msg comment-annotated-tag >actual &&
git diff expect actual
* ok 48: creating a tag with a #comment in the -m message should succeed
* expecting success:
git-tag -F commentfile commentfile-annotated-tag &&
get_tag_msg commentfile-annotated-tag >actual &&
git diff expect actual
* ok 49: creating a tag with #comments in the -F messagefile should succeed
* expecting success:
git-tag -F commentnonlfile commentnonlfile-annotated-tag &&
get_tag_msg commentnonlfile-annotated-tag >actual &&
git diff expect actual
* ok 50: creating a tag with a file of #comment and no newline should succeed
* expecting success:
git-tag -m "A msg" tag-one-line &&
echo "tag-one-line" >expect &&
git-tag -l | grep "^tag-one-line" >actual &&
git diff expect actual &&
git-tag -n0 -l | grep "^tag-one-line" >actual &&
git diff expect actual &&
git-tag -n0 -l tag-one-line >actual &&
git diff expect actual &&
echo "tag-one-line A msg" >expect &&
git-tag -n1 -l | grep "^tag-one-line" >actual &&
git diff expect actual &&
git-tag -n -l | grep "^tag-one-line" >actual &&
git diff expect actual &&
git-tag -n1 -l tag-one-line >actual &&
git diff expect actual &&
git-tag -n2 -l tag-one-line >actual &&
git diff expect actual &&
git-tag -n999 -l tag-one-line >actual &&
git diff expect actual
* ok 51: listing the one-line message of a non-signed tag should succeed
* expecting success:
git-tag -m "" tag-zero-lines &&
echo "tag-zero-lines" >expect &&
git-tag -l | grep "^tag-zero-lines" >actual &&
git diff expect actual &&
git-tag -n0 -l | grep "^tag-zero-lines" >actual &&
git diff expect actual &&
git-tag -n0 -l tag-zero-lines >actual &&
git diff expect actual &&
echo "tag-zero-lines " >expect &&
git-tag -n1 -l | grep "^tag-zero-lines" >actual &&
git diff expect actual &&
git-tag -n -l | grep "^tag-zero-lines" >actual &&
git diff expect actual &&
git-tag -n1 -l tag-zero-lines >actual &&
git diff expect actual &&
git-tag -n2 -l tag-zero-lines >actual &&
git diff expect actual &&
git-tag -n999 -l tag-zero-lines >actual &&
git diff expect actual
* ok 52: listing the zero-lines message of a non-signed tag should succeed
* expecting success:
git-tag -F annotagmsg tag-lines &&
echo "tag-lines" >expect &&
git-tag -l | grep "^tag-lines" >actual &&
git diff expect actual &&
git-tag -n0 -l | grep "^tag-lines" >actual &&
git diff expect actual &&
git-tag -n0 -l tag-lines >actual &&
git diff expect actual &&
echo "tag-lines tag line one" >expect &&
git-tag -n1 -l | grep "^tag-lines" >actual &&
git diff expect actual &&
git-tag -n -l | grep "^tag-lines" >actual &&
git diff expect actual &&
git-tag -n1 -l tag-lines >actual &&
git diff expect actual &&
echo " tag line two" >>expect &&
git-tag -n2 -l | grep "^ *tag.line" >actual &&
git diff expect actual &&
git-tag -n2 -l tag-lines >actual &&
git diff expect actual &&
echo " tag line three" >>expect &&
git-tag -n3 -l | grep "^ *tag.line" >actual &&
git diff expect actual &&
git-tag -n3 -l tag-lines >actual &&
git diff expect actual &&
git-tag -n4 -l | grep "^ *tag.line" >actual &&
git diff expect actual &&
git-tag -n4 -l tag-lines >actual &&
git diff expect actual &&
git-tag -n99 -l | grep "^ *tag.line" >actual &&
git diff expect actual &&
git-tag -n99 -l tag-lines >actual &&
git diff expect actual
* ok 53: listing many message lines of a non-signed tag should succeed
* expecting success:
tag_exists annotated-tag &&
! git-tag -v annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer at example.com> 1112911993 -0700
A message
fatal: exec gpg failed.
error: could not verify the tag 'annotated-tag'
* ok 54: trying to verify an annotated non-signed tag should fail
* expecting success:
tag_exists file-annotated-tag &&
! git-tag -v file-annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer at example.com> 1112911993 -0700
Another message
in a file.
fatal: exec gpg failed.
error: could not verify the tag 'file-annotated-tag'
* ok 55: trying to verify a file-annotated non-signed tag should fail
* expecting success:
tag_exists annotated-tag file-annotated-tag &&
! git-tag -v annotated-tag file-annotated-tag
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag annotated-tag
tagger C O Mitter <committer at example.com> 1112911993 -0700
A message
fatal: exec gpg failed.
error: could not verify the tag 'annotated-tag'
object 86e17e4ed4cddf9a4f960da789f8378f6ea1ff2b
type commit
tag file-annotated-tag
tagger C O Mitter <committer at example.com> 1112911993 -0700
Another message
in a file.
fatal: exec gpg failed.
error: could not verify the tag 'file-annotated-tag'
* ok 56: trying to verify two annotated non-signed tags should fail
t7004-tag.sh: 603: gpg: not found
Skipping signed tags tests, because gpg was not found
* passed all 56 test(s)
*** t7005-editor.sh ***
* expecting success:
msg="Hand edited" &&
echo "$msg" >expect &&
git add editor &&
test_tick &&
git commit -m "$msg" &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created initial commit e745689: Hand edited
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 1: setup
* expecting success:
if git commit --amend
then
echo "Oops?"
false
else
: happy
fi
Terminal is dumb but no VISUAL nor EDITOR defined.
Please supply the message using either -m or -F option.
* ok 2: dumb should error out when falling back on editor
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit 6424b73: Edited by editor
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 3: Using editor
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit d3e43d9: Edited by EDITOR
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 4: Using EDITOR
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit efa3c5a: Edited by VISUAL
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 5: Using VISUAL
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit b17aa22: Edited by core_editor
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 6: Using core_editor
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit da57026: Edited by GIT_EDITOR
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 7: Using GIT_EDITOR
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit 6424b73: Edited by editor
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 8: Using editor (override)
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit d3e43d9: Edited by EDITOR
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 9: Using EDITOR (override)
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit efa3c5a: Edited by VISUAL
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 10: Using VISUAL (override)
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit b17aa22: Edited by core_editor
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 11: Using core_editor (override)
* expecting success:
git --exec-path=. commit --amend &&
git show -s --pretty=oneline |
sed -e "s/^[0-9a-f]* //" >actual &&
diff actual expect
Created commit da57026: Edited by GIT_EDITOR
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100755 editor
* ok 12: Using GIT_EDITOR (override)
* passed all 12 test(s)
*** t7101-reset.sh ***
* expecting success: mkdir path0 &&
cp ../../COPYING path0/COPYING &&
git add path0/COPYING &&
git-commit -m add -a
Created initial commit e5b6b99: add
1 files changed, 361 insertions(+), 0 deletions(-)
create mode 100644 path0/COPYING
* ok 1: creating initial files
* expecting success: mkdir path1 &&
mkdir path1/path2 &&
cp ../../COPYING path1/path2/COPYING &&
cp ../../COPYING path1/COPYING &&
cp ../../COPYING COPYING &&
cp ../../COPYING path0/COPYING-TOO &&
git add path1/path2/COPYING &&
git add path1/COPYING &&
git add COPYING &&
git add path0/COPYING-TOO &&
git-commit -m change -a
Created commit fb38f5f: change
4 files changed, 1444 insertions(+), 0 deletions(-)
create mode 100644 COPYING
create mode 100644 path0/COPYING-TOO
create mode 100644 path1/COPYING
create mode 100644 path1/path2/COPYING
* ok 2: creating second files
* expecting success: git-reset --hard HEAD^
HEAD is now at e5b6b99... add
* ok 3: resetting tree HEAD^
* expecting success: test -d path0 &&
test -f path0/COPYING
* ok 4: checking initial files exist after rewind
* expecting failure: test -f path1/path2/COPYING
* ok 5: checking lack of path1/path2/COPYING
* expecting failure: test -f path1/COPYING
* ok 6: checking lack of path1/COPYING
* expecting failure: test -f COPYING
* ok 7: checking lack of COPYING
* expecting failure: test -f path0/COPYING-TOO
* ok 8: checking checking lack of path1/COPYING-TOO
* expecting failure: test -d path1/path2
* ok 9: checking lack of path1/path2
* expecting failure: test -d path1
* ok 10: checking lack of path1
* passed all 10 test(s)
*** t7102-reset.sh ***
* expecting success:
test_tick &&
echo "1st file" >first &&
git add first &&
git commit -m "create 1st file" &&
echo "2nd file" >second &&
git add second &&
git commit -m "create 2nd file" &&
echo "2nd line 1st file" >>first &&
git commit -a -m "modify 1st file" &&
git rm first &&
git mv second secondfile &&
git commit -a -m "remove 1st and rename 2nd" &&
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
git commit -a -m "modify 2nd file"
Created initial commit 811bbdf: create 1st file
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 first
Created commit ba22ccd: create 2nd file
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 second
Created commit ddaefe0: modify 1st file
1 files changed, 1 insertions(+), 0 deletions(-)
rm 'first'
Created commit d1a4bc3: remove 1st and rename 2nd
2 files changed, 0 insertions(+), 2 deletions(-)
delete mode 100644 first
rename second => secondfile (100%)
Created commit 3ec3965: modify 2nd file
1 files changed, 2 insertions(+), 1 deletions(-)
* ok 1: creating initial files and commits
* expecting success:
! git reset aaaaaa &&
! git reset --mixed aaaaaa &&
! git reset --soft aaaaaa &&
! git reset --hard aaaaaa &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
fatal: Failed to resolve 'aaaaaa' as a valid ref.
fatal: Failed to resolve 'aaaaaa' as a valid ref.
fatal: Failed to resolve 'aaaaaa' as a valid ref.
fatal: Failed to resolve 'aaaaaa' as a valid ref.
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 2: giving a non existing revision should fail
* expecting success:
touch .git/MERGE_HEAD &&
echo "100644 44c5b5884550c17758737edcced463447b91d42b 1 un" |
git update-index --index-info &&
! git reset --soft HEAD &&
rm .git/MERGE_HEAD &&
git rm --cached -- un
fatal: Cannot do a soft reset in the middle of a merge.
rm 'un'
* ok 3: reset --soft with unmerged index should fail
* expecting success:
! git reset --soft -- first &&
! git reset --hard -- first &&
! git reset --soft HEAD^ -- first &&
! git reset --hard HEAD^ -- first &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
fatal: Cannot do soft reset with paths.
fatal: Cannot do hard reset with paths.
fatal: Cannot do soft reset with paths.
fatal: Cannot do hard reset with paths.
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 4: giving paths with options different than --mixed should fail
* expecting success:
! git reset --other &&
! git reset -o &&
! git reset --mixed --other &&
! git reset --mixed -o &&
! git reset --soft --other &&
! git reset --soft -o &&
! git reset --hard --other &&
! git reset --hard -o &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
usage: git-reset [--mixed | --soft | --hard] [-q] [<commit-ish>] [ [--] <paths>...]
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 5: giving unrecognized options should fail
* expecting success:
git branch branch1 &&
git branch branch2 &&
git checkout branch1 &&
echo "3rd line in branch1" >>secondfile &&
git commit -a -m "change in branch1" &&
git checkout branch2 &&
echo "3rd line in branch2" >>secondfile &&
git commit -a -m "change in branch2" &&
! git merge branch1 &&
! git reset --soft &&
printf "1st line 2nd file
2nd line 2nd file
3rd line" >secondfile &&
git commit -a -m "the change in branch2" &&
git checkout master &&
git branch -D branch1 branch2 &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
Switched to branch "branch1"
Created commit 4a775ee: change in branch1
1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "branch2"
Created commit 77abb33: change in branch2
1 files changed, 1 insertions(+), 0 deletions(-)
Merging HEAD with branch1
Merging:
77abb33 change in branch2
4a775ee change in branch1
found 1 common ancestor(s):
3ec3965 modify 2nd file
Auto-merged secondfile
CONFLICT (content): Merge conflict in secondfile
Automatic merge failed; fix conflicts and then commit the result.
fatal: Cannot do a soft reset in the middle of a merge.
Created commit a360825: the change in branch2
Switched to branch "master"
Deleted branch branch1.
Deleted branch branch2.
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 6: trying to do reset --soft with pending merge should fail
* expecting success:
git branch branch3 &&
git branch branch4 &&
git checkout branch3 &&
echo "3rd line in branch3" >>secondfile &&
git commit -a -m "line in branch3" &&
git checkout branch4 &&
echo "3rd line in branch4" >>secondfile &&
git checkout -m branch3 &&
! git reset --soft &&
printf "1st line 2nd file
2nd line 2nd file
3rd line" >secondfile &&
git commit -a -m "the line in branch3" &&
git checkout master &&
git branch -D branch3 branch4 &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
Switched to branch "branch3"
Created commit 09b7c70: line in branch3
1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "branch4"
Merging branch3 with local
Merging:
09b7c70 line in branch3
virtual local
found 1 common ancestor(s):
3ec3965 modify 2nd file
Auto-merged secondfile
CONFLICT (content): Merge conflict in secondfile
M secondfile
Switched to branch "branch3"
fatal: Cannot do a soft reset in the middle of a merge.
Created commit a7b4407: the line in branch3
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "master"
Deleted branch branch3.
Deleted branch branch4.
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 7: trying to do reset --soft with pending checkout merge should fail
* expecting success:
git reset --hard &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset --hard HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset --soft &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset --soft HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset --mixed &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset --mixed HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
git reset HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
HEAD is now at 3ec3965... modify 2nd file
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
HEAD is now at 3ec3965... modify 2nd file
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 8: resetting to HEAD with no changes should succeed and do nothing
* expecting success:
git reset --soft HEAD^ &&
check_changes d1a4bc3abce4829628ae2dcb0d60ef3d1a78b1c4 &&
test "$(git rev-parse ORIG_HEAD)" = \
3ec39651e7f44ea531a5de18a9fa791c0fd370fc
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index be661ce..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 9: --soft reset only should show changes in diff --cached
* expecting success:
echo "3rd line 2nd file" >>secondfile &&
git commit -a -C ORIG_HEAD &&
check_changes 3d3b7be011a58ca0c179ae45d94e6c83c0b0cd0d &&
test "$(git rev-parse ORIG_HEAD)" = \
3ec39651e7f44ea531a5de18a9fa791c0fd370fc
Created commit 3d3b7be: modify 2nd file
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 883db45..0000000 100644
* ok 10: changing files and redo the last commit should succeed
* expecting success:
git reset --hard HEAD~2 &&
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
test "$(git rev-parse ORIG_HEAD)" = \
3d3b7be011a58ca0c179ae45d94e6c83c0b0cd0d
HEAD is now at ddaefe0... modify 1st file
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index b54c0f3..0000000 100644
* ok 11: --hard reset should change the files and undo commits permanently
* expecting success:
git rm first &&
git mv second secondfile &&
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
git add secondfile &&
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e
rm 'first'
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index ce909f4..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 12: redoing changes adding them without commit them should succeed
* expecting success:
git reset &&
check_changes ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
test "$(git rev-parse ORIG_HEAD)" = \
ddaefe00f1da16864591c61fdc7adb5d7cd6b74e
first: needs update
second: needs update
diff --git a/.diff_expect b/-
index 35e1b1e..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 13: --mixed reset to HEAD should unadd the files
* expecting success:
git add secondfile &&
git reset --hard ddaefe00f1da16864591c61fdc7adb5d7cd6b74e &&
git rm first &&
git mv second secondfile &&
git commit -a -m "remove 1st and rename 2nd" &&
echo "1st line 2nd file" >secondfile &&
echo "2nd line 2nd file" >>secondfile &&
git commit -a -m "modify 2nd file" &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
HEAD is now at ddaefe0... modify 1st file
rm 'first'
Created commit d1a4bc3: remove 1st and rename 2nd
2 files changed, 0 insertions(+), 2 deletions(-)
delete mode 100644 first
rename second => secondfile (100%)
Created commit 3ec3965: modify 2nd file
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 14: redoing the last two commits should succeed
* expecting success:
git branch branch1 &&
git branch branch2 &&
git checkout branch1 &&
echo "3rd line in branch1" >>secondfile &&
git commit -a -m "change in branch1" &&
git checkout branch2 &&
echo "3rd line in branch2" >>secondfile &&
git commit -a -m "change in branch2" &&
! git pull . branch1 &&
git reset --hard &&
check_changes 77abb337073fb4369a7ad69ff6f5ec0e4d6b54bb
Switched to branch "branch1"
Created commit 4a775ee: change in branch1
1 files changed, 1 insertions(+), 0 deletions(-)
Switched to branch "branch2"
Created commit 77abb33: change in branch2
1 files changed, 1 insertions(+), 0 deletions(-)
Merging HEAD with 4a775ee1b5fc5eafec2c2e60ed1fce971783c565
Merging:
77abb33 change in branch2
4a775ee change in branch1
found 1 common ancestor(s):
3ec3965 modify 2nd file
Auto-merged secondfile
CONFLICT (content): Merge conflict in secondfile
Automatic merge failed; fix conflicts and then commit the result.
HEAD is now at 77abb33... change in branch2
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 5be78a7..0000000 100644
* ok 15: --hard reset to HEAD should clear a failed merge
* expecting success:
git reset --hard HEAD^ &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git pull . branch1 &&
git reset --hard ORIG_HEAD &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc &&
git checkout master &&
git branch -D branch1 branch2 &&
check_changes 3ec39651e7f44ea531a5de18a9fa791c0fd370fc
HEAD is now at 3ec3965... modify 2nd file
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
Updating 3ec3965..4a775ee
Fast forward
secondfile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
HEAD is now at 3ec3965... modify 2nd file
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
Switched to branch "master"
Deleted branch branch1.
Deleted branch branch2.
diff --git a/.diff_expect b/-
index e69de29..0000000 100644
diff --git a/.cached_expect b/-
index e69de29..0000000 100644
diff --git a/.cat_expect b/-
index 0a70acf..0000000 100644
* ok 16: --hard reset to ORIG_HEAD should clear a fast-forward merge
* expecting success:
echo 1 > file1 &&
echo 2 > file2 &&
git add file1 file2 &&
test_tick &&
git commit -m files &&
git rm file2 &&
echo 3 > file3 &&
echo 4 > file4 &&
echo 5 > file1 &&
git add file1 file3 file4 &&
! git reset HEAD -- file1 file2 file3 &&
git diff > output &&
git diff output expect &&
git diff --cached > output &&
git diff output cached_expect
Created commit 1a12fe9: files
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 file1
create mode 100644 file2
rm 'file2'
file1: needs update
file2: needs update
* ok 17: test --mixed <paths>
* expecting success:
mkdir sub &&
>sub/file1 &&
>sub/file2 &&
git update-index --add sub/file1 sub/file2 &&
T=$(git write-tree) &&
! git reset HEAD sub/file2 &&
U=$(git write-tree) &&
echo "$T" &&
echo "$U" &&
! git diff-index --cached --exit-code "$T" &&
test "$T" != "$U"
file1: needs update
file2: needs update
9571d9b5fb34d9c1274612948c5356f0615744bc
88880074c0c9957f91fd21817fee120b773fc32c
:100644 000000 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 D sub/file2
* ok 18: test resetting the index at give paths
* expecting success:
git reset --hard &&
git reset -- file1 &&
git diff-files --exit-code &&
git diff-index --cached --exit-code HEAD
HEAD is now at 1a12fe9... files
* ok 19: resetting an unmodified path is a no-op
* expecting success:
echo 123 >> file2 &&
git reset --mixed HEAD > output &&
git diff --exit-code expect output
* ok 20: --mixed refreshes the index
* passed all 20 test(s)
*** t7103-reset-bare.sh ***
* expecting success:
echo one >file &&
git add file &&
git commit -m one &&
echo two >file &&
git commit -a -m two
Created initial commit 0f48df8: one
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit 544c6cd: two
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 1: setup non-bare
* expecting success:
git clone --bare . bare.git &&
cd bare.git
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/bare.git/
0 blocks
* ok 2: setup bare
* expecting success:
! git reset --hard HEAD^
fatal: hard reset makes no sense in a bare repository
* ok 3: hard reset is not allowed
* expecting success:
git reset --soft HEAD^ &&
test "`git show --pretty=format:%s | head -n 1`" = "one"
* ok 4: soft reset is allowed
* passed all 4 test(s)
*** t7201-co.sh ***
* expecting success:
fill x y z > same &&
fill 1 2 3 4 5 6 7 8 >one &&
fill a b c d e >two &&
git add same one two &&
git commit -m "Initial A one, A two" &&
git checkout -b renamer &&
rm -f one &&
fill 1 3 4 5 6 7 8 >uno &&
git add uno &&
fill a b c d e f >two &&
git commit -a -m "Renamer R one->uno, M two" &&
git checkout -b side master &&
fill 1 2 3 4 5 6 7 >one &&
fill A B C D E >three &&
rm -f two &&
git update-index --add --remove one two three &&
git commit -m "Side M one, D two, A three" &&
git checkout master
Created initial commit 7329388: Initial A one, A two
3 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644 one
create mode 100644 same
create mode 100644 two
Switched to a new branch "renamer"
Created commit 0420b41: Renamer R one->uno, M two
2 files changed, 1 insertions(+), 1 deletions(-)
rename one => uno (87%)
Switched to a new branch "side"
Created commit ab76817: Side M one, D two, A three
3 files changed, 5 insertions(+), 6 deletions(-)
create mode 100644 three
delete mode 100644 two
Switched to branch "master"
* ok 1: setup
* expecting success:
git checkout -b delete-me master &&
rm .git/refs/heads/delete-me &&
test refs/heads/delete-me = "$(git symbolic-ref HEAD)" &&
git checkout master &&
test refs/heads/master = "$(git symbolic-ref HEAD)"
Switched to a new branch "delete-me"
warning: You appear to be on a branch yet to be born.
warning: Forcing checkout of master.
Switched to branch "master"
* ok 2: checkout from non-existing branch
* expecting success:
fill 0 1 2 3 4 5 6 7 8 >one &&
if git checkout side
then
echo Not happy
false
else
echo "happy - failed correctly"
fi
fatal: Entry 'one' not uptodate. Cannot merge.
happy - failed correctly
* ok 3: checkout with dirty tree without -m
* expecting success:
git checkout -f master &&
fill 0 1 2 3 4 5 6 7 8 >same &&
cp same kept
git checkout side >messages &&
git diff same kept
(cat > messages.expect <<EOF
M same
EOF
) &&
touch messages.expect &&
git diff messages.expect messages
Already on branch "master"
Switched to branch "side"
* ok 4: checkout with unrelated dirty tree without -m
* expecting success:
git checkout -f master &&
git clean -f &&
fill 0 1 2 3 4 5 6 7 8 >one &&
git checkout -m side > messages &&
test "$(git symbolic-ref HEAD)" = "refs/heads/side" &&
(cat >expect.messages <<EOF
Merging side with local
Merging:
ab76817 Side M one, D two, A three
virtual local
found 1 common ancestor(s):
7329388 Initial A one, A two
Auto-merged one
M one
EOF
) &&
git diff expect.messages messages &&
fill "M one" "A three" "D two" >expect.master &&
git diff --name-status master >current.master &&
diff expect.master current.master &&
fill "M one" >expect.side &&
git diff --name-status side >current.side &&
diff expect.side current.side &&
: >expect.index &&
git diff --cached >current.index &&
diff expect.index current.index
Switched to branch "master"
Removing kept
Removing messages
Removing messages.expect
Switched to branch "side"
* ok 5: checkout -m with dirty tree
* expecting success:
git checkout -f master && git clean -f &&
fill 1 2 3 4 5 7 8 >one &&
if git checkout renamer
then
echo Not happy
false
else
echo "happy - failed correctly"
fi &&
git checkout -m renamer &&
fill 1 3 4 5 7 8 >expect &&
diff expect uno &&
! test -f one &&
git diff --cached >current &&
! test -s current
Switched to branch "master"
Removing current.index
Removing current.master
Removing current.side
Removing expect.index
Removing expect.master
Removing expect.messages
Removing expect.side
Removing messages
fatal: Entry 'one' not uptodate. Cannot merge.
happy - failed correctly
Merging renamer with local
Merging:
0420b41 Renamer R one->uno, M two
virtual local
found 1 common ancestor(s):
7329388 Initial A one, A two
Renamed one => uno
Auto-merged uno
M uno
Switched to branch "renamer"
* ok 6: checkout -m with dirty tree, renamed
* expecting success:
git checkout -f master && git clean -f &&
fill 1 T 3 4 5 6 S 8 >one &&
if git checkout renamer
then
echo Not happy
false
else
echo "happy - failed correctly"
fi &&
git checkout -m renamer &&
git diff master:one :3:uno |
sed -e "1,/^@@/d" -e "/^ /d" -e "s/^-/d/" -e "s/^+/a/" >current &&
fill d2 aT d7 aS >expect &&
diff current expect &&
git diff --cached two >current &&
! test -s current
Switched to branch "master"
Removing current
Removing expect
fatal: Entry 'one' not uptodate. Cannot merge.
happy - failed correctly
Merging renamer with local
Merging:
0420b41 Renamer R one->uno, M two
virtual local
found 1 common ancestor(s):
7329388 Initial A one, A two
Renamed one => uno
Auto-merged uno
CONFLICT (rename/modify): Merge conflict in uno
M uno
Switched to branch "renamer"
* ok 7: checkout -m with merge conflict
* expecting success:
git checkout -f renamer && git clean -f &&
git checkout renamer^ 2>messages &&
(cat >messages.expect <<EOF
Note: moving to "renamer^" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 7329388... Initial A one, A two
EOF
) &&
git diff messages.expect messages &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Already on branch "renamer"
Removing current
Removing expect
* ok 8: checkout to detach HEAD
* expecting success:
git checkout -f master && git clean -f &&
git checkout renamer^ &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Switched to branch "master"
Removing messages
Removing messages.expect
Note: moving to "renamer^" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 7329388... Initial A one, A two
* ok 9: checkout to detach HEAD with branchname^
* expecting success:
git checkout -f master && git clean -f &&
git checkout HEAD^0 &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
if git symbolic-ref HEAD >/dev/null 2>&1
then
echo "OOPS, HEAD is still symbolic???"
false
else
: happy
fi
Switched to branch "master"
Note: moving to "HEAD^0" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at 7329388... Initial A one, A two
* ok 10: checkout to detach HEAD with HEAD^0
* expecting success:
git tag both side &&
git branch both master &&
git reset --hard &&
git checkout master &&
git checkout both &&
H=$(git rev-parse --verify HEAD) &&
M=$(git show-ref -s --verify refs/heads/master) &&
test "z$H" = "z$M" &&
name=$(git symbolic-ref HEAD 2>/dev/null) &&
test "z$name" = zrefs/heads/both
HEAD is now at 7329388... Initial A one, A two
Switched to branch "master"
Switched to branch "both"
* ok 11: checkout with ambiguous tag/branch names
* expecting success:
git reset --hard &&
git checkout master &&
git tag frotz side &&
git branch frotz master &&
git reset --hard &&
git checkout master &&
git checkout tags/frotz &&
H=$(git rev-parse --verify HEAD) &&
S=$(git show-ref -s --verify refs/heads/side) &&
test "z$H" = "z$S" &&
if name=$(git symbolic-ref HEAD 2>/dev/null)
then
echo "Bad -- should have detached"
false
else
: happy
fi
HEAD is now at 7329388... Initial A one, A two
Switched to branch "master"
HEAD is now at 7329388... Initial A one, A two
Already on branch "master"
Note: moving to "tags/frotz" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b <new_branch_name>
HEAD is now at ab76817... Side M one, D two, A three
* ok 12: checkout with ambiguous tag/branch names
* passed all 12 test(s)
*** t7300-clean.sh ***
* expecting success:
mkdir -p src &&
touch src/part1.c Makefile &&
echo build >.gitignore &&
echo \*.o >>.gitignore &&
git add . &&
git-commit -m setup &&
touch src/part2.c README &&
git add .
Created initial commit e1a0425: setup
1 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
create mode 100644 Makefile
create mode 100644 src/part1.c
* ok 1: setup
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Not removing docs/
Removing src/part3.c
* ok 2: git-clean
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing src/part3.c
* ok 3: git-clean src/
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean src/ src/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing src/part3.c
* ok 4: git-clean src/ src/
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
(cd src/ && git-clean) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing part3.c
* ok 5: git-clean with prefix
* expecting success:
mkdir -p build docs src/feature &&
touch a.out src/part3.c src/feature/file.c docs/manual.txt obj.o build/lib.so &&
(cd src/ && git-clean -d feature/) &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test ! -f src/feature/file.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing feature/file.c
* ok 6: git-clean -d with prefix and path
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
ln -s docs/manual.txt src/part4.c
git-clean &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -f src/part4.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Not removing docs/
Not removing src/feature/
Removing src/part3.c
Removing src/part4.c
* ok 7: git-clean symbolic link
* expecting success:
touch a.clean b.clean other.c &&
git-clean "*.clean" &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.clean &&
test ! -f b.clean &&
test -f other.c
Removing a.clean
Removing b.clean
Not removing docs/
Not removing src/feature/
* ok 8: git-clean with wildcard
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Would remove a.out
Would not remove docs/
Would remove other.c
Would not remove src/feature/
Would remove src/part3.c
* ok 9: git-clean -n
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -d &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -d docs &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Removing docs/
Removing other.c
Removing src/feature/
Removing src/part3.c
* ok 10: git-clean -d
* expecting success:
mkdir -p build docs examples &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so examples/1.c &&
git-clean -d src/ examples/ &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test ! -f src/part3.c &&
test ! -f examples/1.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing examples/
Removing src/part3.c
* ok 11: git-clean -d src/ examples/
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test -f build/lib.so
Removing a.out
Not removing build/
Not removing docs/
Removing obj.o
Removing src/part3.c
* ok 12: git-clean -x
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -d -x &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test ! -d docs &&
test ! -f obj.o &&
test ! -d build
Removing a.out
Removing build/
Removing docs/
Removing obj.o
Removing src/part3.c
* ok 13: git-clean -d -x
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test -f build/lib.so
Not removing build/
Removing obj.o
* ok 14: git-clean -X
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -d -X &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test ! -f obj.o &&
test ! -d build
Removing build/
Removing obj.o
* ok 15: git-clean -d -X
* expecting success:
git config --unset clean.requireForce &&
! git-clean
fatal: clean.requireForce not set and -n or -f not given; refusing to clean
* ok 16: clean.requireForce defaults to true
* expecting success:
git config clean.requireForce true &&
! git-clean
fatal: clean.requireForce set and -n or -f not given; refusing to clean
* ok 17: clean.requireForce
* expecting success:
mkdir -p build docs &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so &&
git-clean -n &&
test -f Makefile &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test -f a.out &&
test -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Would remove a.out
Would not remove docs/
Would remove src/part3.c
* ok 18: clean.requireForce and -n
* expecting success:
git-clean -f &&
test -f README &&
test -f src/part1.c &&
test -f src/part2.c &&
test ! -f a.out &&
test ! -f src/part3.c &&
test -f docs/manual.txt &&
test -f obj.o &&
test -f build/lib.so
Removing a.out
Not removing docs/
Removing src/part3.c
* ok 19: clean.requireForce and -f
* expecting success:
echo excludes >excludes &&
echo included >included &&
git config core.excludesfile excludes &&
output=$(git clean -n excludes included 2>&1) &&
expr "$output" : ".*included" >/dev/null &&
! expr "$output" : ".*excludes" >/dev/null
* ok 20: core.excludesfile
* passed all 20 test(s)
*** t7400-submodule-basic.sh ***
* expecting success:
: > t &&
git-add t &&
git-commit -m "initial commit" &&
git branch initial HEAD &&
mkdir init &&
cd init &&
git init &&
echo a >a &&
git add a &&
git-commit -m "submodule commit 1" &&
git-tag -a -m "rev-1" rev-1 &&
rev1=$(git rev-parse HEAD) &&
if test -z "$rev1"
then
echo "[OOPS] submodule git rev-parse returned nothing"
false
fi &&
cd .. &&
echo a >a &&
echo z >z &&
git add a init z &&
git-commit -m "super commit 1" &&
mv init .subrepo &&
GIT_CONFIG=.gitmodules git config submodule.example.url git://example.com/init.git
Created initial commit ea1c23d: initial commit
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 t
Initialized empty Git repository in .git/
Created initial commit 6273579: submodule commit 1
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 a
Created commit 8e35954: super commit 1
3 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 a
create mode 160000 init
create mode 100644 z
* ok 1: Prepare submodule testing
* expecting success:
if git-submodule status
then
echo "[OOPS] submodule status succeeded"
false
elif ! GIT_CONFIG=.gitmodules git config submodule.example.path init
then
echo "[OOPS] git config failed to update .gitmodules"
false
fi
No submodule mapping found in .gitmodules for path 'init'
* ok 2: status should fail for unmapped paths
* expecting success:
lines=$(git-submodule status | wc -l) &&
test $lines = 1
* ok 3: status should only print one line
* expecting success:
git-submodule status | grep "^-$rev1"
-6273579a6e8fabf1bf059a53d5d1be96cdb3dc6b init
* ok 4: status should initially be "missing"
* expecting success:
git-submodule init &&
url=$(git config submodule.example.url) &&
if test "$url" != "git://example.com/init.git"
then
echo "[OOPS] init succeeded but submodule url is wrong"
false
elif ! git config submodule.example.url ./.subrepo
then
echo "[OOPS] init succeeded but update of url failed"
false
fi
Submodule 'example' (git://example.com/init.git) registered for path 'init'
* ok 5: init should register submodule url in .git/config
* expecting success:
echo "hello" >init &&
if git-submodule update
then
echo "[OOPS] update should have failed"
false
elif test "$(cat init)" != "hello"
then
echo "[OOPS] update failed but init file was molested"
false
else
rm init
fi
A file already exist at path 'init'
* ok 6: update should fail when path is used by a file
* expecting success:
mkdir init &&
echo "hello" >init/a &&
if git-submodule update
then
echo "[OOPS] update should have failed"
false
elif test "$(cat init/a)" != "hello"
then
echo "[OOPS] update failed but init/a was molested"
false
else
rm init/a
fi
Directory 'init' exist, but is neither empty nor a git repository
* ok 7: update should fail when path is used by a nonempty directory
* expecting success:
rm -rf init &&
mkdir init &&
git-submodule update &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
echo "[OOPS] Failed to obtain submodule head"
false
elif test "$head" != "$rev1"
then
echo "[OOPS] Submodule head is $head but should have been $rev1"
false
fi
Initialized empty Git repository in /build/buildd/git-core-1.5.4.3/t/trash/init/.git/
0 blocks
Submodule path 'init': checked out '6273579a6e8fabf1bf059a53d5d1be96cdb3dc6b'
* ok 8: update should work when path is an empty dir
* expecting success:
git-submodule status | grep "^ $rev1"
6273579a6e8fabf1bf059a53d5d1be96cdb3dc6b init (rev-1)
* ok 9: status should be "up-to-date" after update
* expecting success:
cd init &&
echo b >b &&
git add b &&
git-commit -m "submodule commit 2" &&
rev2=$(git rev-parse HEAD) &&
cd .. &&
if test -z "$rev2"
then
echo "[OOPS] submodule git rev-parse returned nothing"
false
fi &&
git-submodule status | grep "^+$rev2"
Created commit 8216a76: submodule commit 2
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 b
+8216a763807b2bfe308a78577ef226295858829c init (rev-1-1-g8216a76)
* ok 10: status should be "modified" after submodule commit
* expecting success:
git-submodule --cached status | grep "^+$rev1"
+6273579a6e8fabf1bf059a53d5d1be96cdb3dc6b init (rev-1)
* ok 11: the --cached sha1 should be rev1
* expecting success:
git-diff | grep "^+Subproject commit $rev2"
+Subproject commit 8216a763807b2bfe308a78577ef226295858829c
* ok 12: git diff should report the SHA1 of the new submodule commit
* expecting success:
git-submodule update init &&
head=$(cd init && git rev-parse HEAD) &&
if test -z "$head"
then
echo "[OOPS] submodule git rev-parse returned nothing"
false
elif test "$head" != "$rev1"
then
echo "[OOPS] init did not checkout correct head"
false
fi
Submodule path 'init': checked out '6273579a6e8fabf1bf059a53d5d1be96cdb3dc6b'
* ok 13: update should checkout rev1
* expecting success:
git-submodule status | grep "^ $rev1"
6273579a6e8fabf1bf059a53d5d1be96cdb3dc6b init (rev-1)
* ok 14: status should be "up-to-date" after update
* expecting success:
git-checkout initial &&
git-checkout master
Switched to branch "initial"
Switched to branch "master"
* ok 15: checkout superproject with subproject already present
* expecting success:
git branch second &&
(
cd init &&
echo s >s &&
git add s &&
git commit -m "change subproject"
) &&
git update-index --add init &&
git-commit -m "change init" &&
git-format-patch -1 --stdout >P.diff &&
git checkout second &&
git apply --index P.diff &&
D=$(git diff --cached master) &&
test -z "$D"
Created commit 1dce3bd: change subproject
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 s
Created commit 748dd88: change init
1 files changed, 1 insertions(+), 1 deletions(-)
M init
Switched to branch "second"
warning: unable to remove submodule init
* ok 16: apply submodule diff
* passed all 16 test(s)
*** t7500-commit.sh ***
* expecting success:
echo content > foo &&
git add foo &&
git commit -m "initial commit"
Created initial commit 830b4ce: initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
* ok 1: a basic commit in an empty tree should succeed
* expecting success:
echo changes >> foo &&
git add foo &&
! git commit --template "$PWD"/notexist
fatal: no commit message? aborting commit.
* ok 2: nonexistent template file should return error
* expecting success:
git config commit.template "$PWD"/notexist &&
! git commit &&
git config --unset commit.template
fatal: no commit message? aborting commit.
* ok 3: nonexistent template file in config should return error
* expecting success:
echo "template line" > "$TEMPLATE" &&
! git commit --template "$TEMPLATE"
fatal: no commit message? aborting commit.
* ok 4: unedited template should not commit
* expecting success:
echo "# comment in template" >> "$TEMPLATE" &&
! git commit --template "$TEMPLATE"
fatal: no commit message? aborting commit.
* ok 5: unedited template with comments should not commit
* expecting success:
! GIT_EDITOR=../t7500/add-signed-off git commit --template "$TEMPLATE"
fatal: no commit message? aborting commit.
* ok 6: a Signed-off-by line by itself should not commit
* expecting success:
! GIT_EDITOR=../t7500/add-comments git commit --template "$TEMPLATE"
fatal: no commit message? aborting commit.
* ok 7: adding comments to a template should not commit
* expecting success:
GIT_EDITOR=../t7500/add-content git commit --template "$TEMPLATE" &&
commit_msg_is "template linecommit message"
Created commit b144831: template line
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 8: adding real content to a template should commit
* expecting success:
echo "short template" > "$TEMPLATE" &&
echo "new content" >> foo &&
git add foo &&
GIT_EDITOR=../t7500/add-content git commit -t "$TEMPLATE" &&
commit_msg_is "short templatecommit message"
Created commit 9d6cc92: short template
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 9: -t option should be short for --template
* expecting success:
echo "new template" > "$TEMPLATE" &&
git config commit.template "$TEMPLATE" &&
echo "more content" >> foo &&
git add foo &&
GIT_EDITOR=../t7500/add-content git commit &&
git config --unset commit.template &&
commit_msg_is "new templatecommit message"
Created commit 2d32307: new template
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 10: config-specified template should commit
* expecting success:
echo "still more content" >> foo &&
git add foo &&
GIT_EDITOR=../t7500/add-content git commit --template "$TEMPLATE" \
-m "command line msg" &&
commit_msg_is "command line msg"
Created commit a53a4b3: command line msg
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 11: explicit commit message should override template
* expecting success:
echo "content galore" >> foo &&
git add foo &&
echo "standard input msg" |
GIT_EDITOR=../t7500/add-content git commit \
--template "$TEMPLATE" --file - &&
commit_msg_is "standard input msg"
Created commit f3f19d6: standard input msg
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 12: commit message from file should override template
* expecting success:
cp .git/index saved-index &&
(
echo some new content >file &&
GIT_INDEX_FILE=.git/another_index &&
export GIT_INDEX_FILE &&
git add file &&
git commit -m "commit using another index" &&
git diff-index --exit-code HEAD &&
git diff-files --exit-code
) &&
cmp .git/index saved-index >/dev/null
Created commit 48c2f1c: commit using another index
2 files changed, 1 insertions(+), 6 deletions(-)
create mode 100644 file
delete mode 100644 foo
* ok 13: using alternate GIT_INDEX_FILE (1)
* expecting success:
cp .git/index saved-index &&
(
rm -f .git/no-such-index &&
GIT_INDEX_FILE=.git/no-such-index &&
export GIT_INDEX_FILE &&
git commit -m "commit using nonexistent index" &&
test -z "$(git ls-files)" &&
test -z "$(git ls-tree HEAD)"
) &&
cmp .git/index saved-index >/dev/null
Created commit 51b878d: commit using nonexistent index
1 files changed, 0 insertions(+), 1 deletions(-)
delete mode 100644 file
* ok 14: using alternate GIT_INDEX_FILE (2)
* expecting success:
echo "yet another content *narf*" >> foo &&
echo "zort" |
GIT_EDITOR=../t7500/add-content git commit -s -F - foo &&
git cat-file commit HEAD | sed "1,/^$/d" > output &&
diff expect output
Created commit 55f1a75: zort
1 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 foo
* ok 15: --signoff
* passed all 15 test(s)
*** t7501-commit.sh ***
* expecting success: echo 'bongo bongo' >file &&
git-add file && git-status | grep 'Initial commit'
# Initial commit
* ok 1: initial status
* expecting failure: git-commit --amend
fatal: You have nothing to amend.
* ok 2: fail initial amend
* expecting success: git-commit -m initial
Created initial commit 402702b: initial
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 3: initial commit
* expecting failure: git-commit -m foo -m bar -F file
fatal: Option -m cannot be combined with -c/-C/-F.
* ok 4: invalid options 1
* expecting failure: git-commit -C HEAD -m illegal
fatal: Option -m cannot be combined with -c/-C/-F.
* ok 5: invalid options 2
* expecting failure: echo King of the bongo >file &&
git-commit -m foo -a file
fatal: Paths with -a does not make sense.
* ok 6: using paths with -a
* expecting failure: echo bong-o-bong >file &&
echo 7 | git-commit -m foo --interactive file
fatal: Paths with --interactive does not make sense.
* ok 7: using paths with --interactive
* expecting failure: git-commit -C bogus
fatal: could not lookup commit bogus
* ok 8: using invalid commit with -C
* expecting failure: git-commit -m initial
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# modified: file
#
no changes added to commit (use "git add" and/or "git commit -a")
* ok 9: testing nothing to commit
* expecting success: echo 'bongo bongo bongo' >file git-commit -m next -a
* ok 10: next commit
* expecting failure: echo 'more bongo: bongo bongo bongo bongo' >file && git-commit -F gah -a
fatal: could not read log file 'gah': No such file or directory
* ok 11: commit message from non-existing file
* expecting failure: git-commit -F msg -a
fatal: no commit message? aborting commit.
* ok 12: empty commit message
* expecting success: echo 'this is the commit message, coming from a file' >msg && git-commit -F msg -a
Created commit f5702da: this is the commit message, coming from a file
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 13: commit message from file
* expecting success: VISUAL=./editor git-commit --amend
Created commit 4fd4409: this is the commit message, coming from an amend commit
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 14: amend commit
* expecting failure: echo 'enough with the bongos' >file && git-commit -F msg -m amending .
fatal: Option -m cannot be combined with -c/-C/-F.
* ok 15: passing -m and -F
* expecting success: git-commit -C HEAD^ .
Created commit d381ac4: initial
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 16: using message from other commit
* expecting success: echo 'hula hula' >file && VISUAL=./editor git-commit -c HEAD^ -a
Created commit 3536bbb: this is the commit message, coming from an older commit
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 17: editing message from other commit
* expecting success: echo 'silly new contents' >file && echo commit message from stdin | git-commit -F - -a
Created commit 9b88fc1: commit message from stdin
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 18: message from stdin
* expecting success: echo 'gak' >file && git-commit -m 'author' --author 'Rubber Duck <rduck at convoy.org>' -a
Created commit 72c0dc9: author
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 19: overriding author from command line
* expecting success: echo 7 | git-commit --interactive | grep 'What now'
What now> Bye.
* ok 20: interactive add
* expecting success: git-rev-list HEAD >current
* ok 21: showing committed revisions
* expecting success: diff current expected
* ok 22: validate git-rev-list output.
* expecting success:
git rm --cached file &&
mv file elif &&
git add elif &&
git commit -m "Partial: add elif" elif &&
git diff-tree --name-status HEAD^ HEAD >current &&
echo "A elif" >expected &&
diff expected current
rm 'file'
Created commit ff8e1ce: Partial: add elif
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 elif
* ok 23: partial commit that involves removal (1)
* expecting success:
git commit -m "Partial: remove file" file &&
git diff-tree --name-status HEAD^ HEAD >current &&
echo "D file" >expected &&
diff expected current
Created commit f9f24b8: Partial: remove file
1 files changed, 0 insertions(+), 1 deletions(-)
delete mode 100644 file
* ok 24: partial commit that involves removal (2)
* expecting success:
git rm --cached elif &&
echo elif >elif &&
git commit -m "Partial: modify elif" elif &&
git diff-tree --name-status HEAD^ HEAD >current &&
echo "M elif" >expected &&
diff expected current
rm 'elif'
Created commit cb745a2: Partial: modify elif
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 25: partial commit that involves removal (3)
* expecting success:
oldtick=$GIT_AUTHOR_DATE &&
test_tick &&
git reset --hard &&
git cat-file -p HEAD |
sed -e "s/author.*/author $author $oldtick/" \
-e "s/^\(committer.*> \).*$/$GIT_COMMITTER_DATE/" > \
expected &&
git commit --amend --author="$author" &&
git cat-file -p HEAD > current &&
diff expected current
HEAD is now at cb745a2... Partial: modify elif
Created commit d23a9b9: Partial: modify elif
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 26: amend commit to fix author
* expecting success:
echo 1 >positive &&
git add positive &&
git commit -s -m "thank you" &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
(
echo thank you
echo
git var GIT_COMMITTER_IDENT |
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
) >expected &&
diff -u expected actual
Created commit 8cbc943: thank you
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 positive
* ok 27: sign off (1)
* expecting success:
echo 2 >positive &&
git add positive &&
existing="Signed-off-by: Watch This <watchthis at example.com>" &&
git commit -s -m "thank you
$existing" &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
(
echo thank you
echo
echo $existing
git var GIT_COMMITTER_IDENT |
sed -e "s/>.*/>/" -e "s/^/Signed-off-by: /"
) >expected &&
diff -u expected actual
Created commit c8a9570: thank you
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 28: sign off (2)
* expecting success:
>negative &&
git add negative &&
git commit -m "one" -m "two" -m "three" &&
git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
(
echo one
echo
echo two
echo
echo three
) >expected &&
diff -u expected actual
Created commit dceb5de: one
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 negative
* ok 29: multiple -m
* expecting success:
oldtick=$GIT_AUTHOR_DATE &&
test_tick &&
git reset --hard &&
git cat-file -p HEAD |
sed -e "s/author.*/author $author $oldtick/" \
-e "s/^\(committer.*> \).*$/$GIT_COMMITTER_DATE/" > \
expected &&
git commit --amend --author="$author" &&
git cat-file -p HEAD > current &&
diff expected current
HEAD is now at dceb5de... one
Created commit 3a53eba: one
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 negative
* ok 30: amend commit to fix author
* expecting success:
echo tacocat > elif &&
echo tehlulz > chz &&
git add chz &&
git commit elif -m "tacocat is a palindrome" &&
git show --stat | grep elif &&
git diff --cached | grep chz
Created commit 01c9c8e: tacocat is a palindrome
1 files changed, 1 insertions(+), 1 deletions(-)
elif | 2 +-
diff --git a/chz b/chz
+++ b/chz
* ok 31: git commit <file> with dirty index
* expecting success:
git reset --hard
if git commit -m empty
then
echo oops -- should have complained
false
else
: happy
fi
HEAD is now at 01c9c8e... tacocat is a palindrome
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# actual
# current
# editor
# expected
# msg
nothing added to commit but untracked files present (use "git add" to track)
* ok 32: same tree (single parent)
* expecting success:
git commit --allow-empty -m "forced empty" &&
git cat-file commit HEAD | grep forced
Created commit 771c9b0: forced empty
forced empty
* ok 33: same tree (single parent) --allow-empty
* expecting success:
git checkout -b side HEAD^ &&
echo zero >zero &&
git add zero &&
git commit -m "add zero" &&
git checkout master &&
git merge -s ours side -m "empty ok" &&
git diff HEAD^ HEAD >actual &&
: >expected &&
diff -u expected actual &&
git commit --amend -m "empty really ok" &&
git diff HEAD^ HEAD >actual &&
: >expected &&
diff -u expected actual
Switched to a new branch "side"
Created commit bb73961: add zero
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 zero
Switched to branch "master"
Merge made by ours.
Created commit 65e0758: empty really ok
* ok 34: same tree (merge and amend merge)
* expecting success:
git reset --hard &&
test_tick &&
git commit --allow-empty -m "old commit" &&
old=$(git rev-parse --verify HEAD) &&
test_tick &&
git commit --allow-empty -m "new commit" &&
new=$(git rev-parse --verify HEAD) &&
test_tick &&
git commit --allow-empty --amend -C "$old" &&
git show --pretty="format:%ad %s" "$old" >expected &&
git show --pretty="format:%ad %s" HEAD >actual &&
diff -u expected actual
HEAD is now at 65e0758... empty really ok
Created commit cc6fa01: old commit
Created commit 96cb860: new commit
Created commit 2a6f6da: old commit
* ok 35: amend using the message from another commit
* expecting success:
git reset --hard &&
test_tick &&
git commit --allow-empty -m "old commit" &&
old=$(git rev-parse --verify HEAD) &&
git tag -a -m "tag on old" tagged-old HEAD &&
test_tick &&
git commit --allow-empty -m "new commit" &&
new=$(git rev-parse --verify HEAD) &&
test_tick &&
git commit --allow-empty --amend -C tagged-old &&
git show --pretty="format:%ad %s" "$old" >expected &&
git show --pretty="format:%ad %s" HEAD >actual &&
diff -u expected actual
HEAD is now at 2a6f6da... old commit
Created commit 5ce79ef: old commit
Created commit 6102ef4: new commit
Created commit 207957b: old commit
* ok 36: amend using the message from a commit named with tag
* passed all 36 test(s)
*** t7502-commit.sh ***
* expecting success:
echo doing partial >"commit is" &&
mkdir not &&
echo very much encouraged but we should >not/forbid &&
git add "commit is" not &&
echo update added "commit is" file >"commit is" &&
echo also update another >not/forbid &&
test_tick &&
git commit -a -m "initial with -a" &&
git cat-file blob HEAD:"commit is" >current.1 &&
git cat-file blob HEAD:not/forbid >current.2 &&
cmp current.1 "commit is" &&
cmp current.2 not/forbid
Created initial commit edcf604: initial with -a
2 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 commit is
create mode 100644 not/forbid
* ok 1: the basics
* expecting success:
echo another >"commit is" &&
echo another >not/forbid &&
test_tick &&
git commit -m "partial commit to handle a file" "commit is" &&
changed=$(git diff-tree --name-only HEAD^ HEAD) &&
test "$changed" = "commit is"
Created commit b3054c2: partial commit to handle a file
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 2: partial
* expecting success:
test_tick &&
git commit -m "partial commit to subdirectory" not &&
changed=$(git diff-tree -r --name-only HEAD^ HEAD) &&
test "$changed" = "not/forbid"
Created commit 88d5748: partial commit to subdirectory
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 3: partial modification in a subdirecotry
* expecting success:
git rm not/forbid &&
git commit -m "partial commit to remove not/forbid" not &&
changed=$(git diff-tree -r --name-only HEAD^ HEAD) &&
test "$changed" = "not/forbid" &&
remain=$(git ls-tree -r --name-only HEAD) &&
test "$remain" = "commit is"
rm 'not/forbid'
Created commit fe39e99: partial commit to remove not/forbid
1 files changed, 0 insertions(+), 1 deletions(-)
delete mode 100644 not/forbid
* ok 4: partial removal
* expecting success:
>positive &&
git add positive &&
git commit -s -m "thank you" &&
actual=$(git cat-file commit HEAD | sed -ne "s/Signed-off-by: //p") &&
expected=$(git var GIT_COMMITTER_IDENT | sed -e "s/>.*/>/") &&
test "z$actual" = "z$expected"
Created commit 89bd87d: thank you
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 positive
* ok 5: sign off
* expecting success:
>negative &&
git add negative &&
git commit -m "one" -m "two" -m "three" &&
actual=$(git cat-file commit HEAD | sed -e "1,/^\$/d") &&
expected=$(echo one; echo; echo two; echo; echo three) &&
test "z$actual" = "z$expected"
Created commit 27c7a72: one
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 negative
* ok 6: multiple -m
* expecting success:
echo minus >negative &&
git add negative &&
git status -v | sed -ne "/^diff --git /p" >actual &&
echo "diff --git a/negative b/negative" >expect &&
diff -u expect actual
* ok 7: verbose
* expecting success:
echo >>negative &&
{ echo;echo "# text";echo; } >expect &&
git commit --cleanup=verbatim -t expect -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d" |head -n 3 >actual &&
diff -u expect actual
Created commit 95a2558: # text
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 8: cleanup commit messages (verbatim,-t)
* expecting success:
echo >>negative &&
git commit --cleanup=verbatim -F expect -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
diff -u expect actual
Created commit 0c638bf: # text
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 9: cleanup commit messages (verbatim,-F)
* expecting success:
echo >>negative &&
git commit --cleanup=verbatim -m "$(cat expect)" -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
diff -u expect actual
Created commit 9168732: # text
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 10: cleanup commit messages (verbatim,-m)
* expecting success:
echo >>negative &&
{ echo;echo "# text";echo; } >text &&
echo "# text" >expect &&
git commit --cleanup=whitespace -F text -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
diff -u expect actual
Created commit 075e55b: # text
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 11: cleanup commit messages (whitespace,-F)
* expecting success:
echo >>negative &&
{ echo;echo "# text";echo sample;echo; } >text &&
echo sample >expect &&
git commit --cleanup=strip -F text -a &&
git cat-file -p HEAD |sed -e "1,/^\$/d">actual &&
diff -u expect actual
Created commit 6091614: sample
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 12: cleanup commit messages (strip,-F)
* expecting success:
echo >>negative &&
{ echo;echo sample;echo; } >text &&
git commit -e -F text -a &&
head -n 4 .git/COMMIT_EDITMSG >actual &&
diff -u expect actual
Created commit b9e2ef0: sample
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 13: cleanup commit messages (strip,-F,-e)
* passed all 13 test(s)
*** t7502-status.sh ***
* expecting success:
: > tracked &&
: > modified &&
mkdir dir1 &&
: > dir1/tracked &&
: > dir1/modified &&
mkdir dir2 &&
: > dir1/tracked &&
: > dir1/modified &&
git add . &&
git status >output &&
test_tick &&
git commit -m initial &&
: > untracked &&
: > dir1/untracked &&
: > dir2/untracked &&
echo 1 > dir1/modified &&
echo 2 > dir2/modified &&
echo 3 > dir2/added &&
git add dir2/added
Created initial commit c867210: initial
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 dir1/modified
create mode 100644 dir1/tracked
create mode 100644 modified
create mode 100644 tracked
* ok 1: setup
* expecting success:
grep -e "use \"git rm --cached <file>\.\.\.\" to unstage" output
# (use "git rm --cached <file>..." to unstage)
* ok 2: status (1)
* expecting success:
git status > output &&
git diff expect output
* ok 3: status (2)
* expecting success:
(cd dir1 && git status) > output &&
git diff expect output
* ok 4: status with relative paths
* expecting success:
git config status.relativePaths false
(cd dir1 && git status) > output &&
git diff expect output
* ok 5: status without relative paths
* expecting success:
git status dir1/modified >output &&
diff -u expect output
* ok 6: status of partial commit excluding new file in index
* passed all 6 test(s)
*** t7503-pre-commit-hook.sh ***
* expecting success:
echo "foo" > file &&
git add file &&
git commit -m "first"
Created initial commit ca3b5de: first
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 1: with no hook
* expecting success:
echo "bar" > file &&
git add file &&
git commit --no-verify -m "bar"
Created commit 8d9c37f: bar
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 2: --no-verify with no hook
* expecting success:
echo "more" >> file &&
git add file &&
git commit -m "more"
Created commit fe8ebf3: more
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 3: with succeeding hook
* expecting success:
echo "even more" >> file &&
git add file &&
git commit --no-verify -m "even more"
Created commit 916a22c: even more
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 4: --no-verify with succeeding hook
* expecting failure:
echo "another" >> file &&
git add file &&
git commit -m "another"
* ok 5: with failing hook
* expecting success:
echo "stuff" >> file &&
git add file &&
git commit --no-verify -m "stuff"
Created commit 84323f7: stuff
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 6: --no-verify with failing hook
* expecting success:
echo "content" >> file &&
git add file &&
git commit -m "content"
Created commit f9bc234: content
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 7: with non-executable hook
* expecting success:
echo "more content" >> file &&
git add file &&
git commit --no-verify -m "more content"
Created commit a3e10fd: more content
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 8: --no-verify with non-executable hook
* passed all 8 test(s)
*** t7504-commit-msg-hook.sh ***
* expecting success:
echo "foo" > file &&
git add file &&
git commit -m "first"
Created initial commit ca3b5de: first
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 1: with no hook
* expecting success:
echo "more foo" >> file &&
git add file &&
echo "more foo" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit
Created commit 7c1c58d: more foo
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 2: with no hook (editor)
* expecting success:
echo "bar" > file &&
git add file &&
git commit --no-verify -m "bar"
Created commit e77bfe2: bar
1 files changed, 1 insertions(+), 2 deletions(-)
* ok 3: --no-verify with no hook
* expecting success:
echo "more bar" > file &&
git add file &&
echo "more bar" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit --no-verify
Created commit eaa5c60: more bar
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 4: --no-verify with no hook (editor)
* expecting success:
echo "more" >> file &&
git add file &&
git commit -m "more"
Created commit e01adff: more
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 5: with succeeding hook
* expecting success:
echo "more more" >> file &&
git add file &&
echo "more more" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit
Created commit d6f2a99: more more
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 6: with succeeding hook (editor)
* expecting success:
echo "even more" >> file &&
git add file &&
git commit --no-verify -m "even more"
Created commit 6077969: even more
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 7: --no-verify with succeeding hook
* expecting success:
echo "even more more" >> file &&
git add file &&
echo "even more more" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit --no-verify
Created commit 97f7a62: even more more
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 8: --no-verify with succeeding hook (editor)
* expecting failure:
echo "another" >> file &&
git add file &&
git commit -m "another"
* ok 9: with failing hook
* expecting failure:
echo "more another" >> file &&
git add file &&
echo "more another" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit
* ok 10: with failing hook (editor)
* expecting success:
echo "stuff" >> file &&
git add file &&
git commit --no-verify -m "stuff"
Created commit 4d651af: stuff
1 files changed, 3 insertions(+), 0 deletions(-)
* ok 11: --no-verify with failing hook
* expecting success:
echo "more stuff" >> file &&
git add file &&
echo "more stuff" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit --no-verify
Created commit cf08e90: more stuff
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 12: --no-verify with failing hook (editor)
* expecting success:
echo "content" >> file &&
git add file &&
git commit -m "content"
Created commit 1bd5f05: content
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 13: with non-executable hook
* expecting success:
echo "content again" >> file &&
git add file &&
echo "content again" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit -m "content again"
Created commit 77577d2: content again
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 14: with non-executable hook (editor)
* expecting success:
echo "more content" >> file &&
git add file &&
git commit --no-verify -m "more content"
Created commit dc8aeed: more content
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 15: --no-verify with non-executable hook
* expecting success:
echo "even more content" >> file &&
git add file &&
echo "even more content" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit --no-verify
Created commit ddc1576: even more content
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 16: --no-verify with non-executable hook (editor)
* expecting success:
echo "additional" >> file &&
git add file &&
git commit -m "additional" &&
commit_msg_is "new message"
Created commit e9a5d1e: new message
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 17: hook edits commit message
* expecting success:
echo "additional content" >> file &&
git add file &&
echo "additional content" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit &&
commit_msg_is "new message"
Created commit a827a04: new message
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 18: hook edits commit message (editor)
* expecting success:
echo "plus" >> file &&
git add file &&
git commit --no-verify -m "plus" &&
commit_msg_is "plus"
Created commit baadfeb: plus
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 19: hook doesn't edit commit message
* expecting success:
echo "more plus" >> file &&
git add file &&
echo "more plus" > FAKE_MSG &&
GIT_EDITOR="$FAKE_EDITOR" git commit --no-verify &&
commit_msg_is "more plus"
Created commit 3edf020: more plus
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 20: hook doesn't edit commit message (editor)
* passed all 20 test(s)
*** t7600-merge.sh ***
* expecting success:
git add file &&
test_tick &&
git commit -m "commit 0" &&
git tag c0 &&
c0=$(git rev-parse HEAD) &&
cp file.1 file &&
git add file &&
test_tick &&
git commit -m "commit 1" &&
git tag c1 &&
c1=$(git rev-parse HEAD) &&
git reset --hard "$c0" &&
cp file.5 file &&
git add file &&
test_tick &&
git commit -m "commit 2" &&
git tag c2 &&
c2=$(git rev-parse HEAD) &&
git reset --hard "$c0" &&
cp file.9 file &&
git add file &&
test_tick &&
git commit -m "commit 3" &&
git tag c3 &&
c3=$(git rev-parse HEAD)
git reset --hard "$c0" &&
create_merge_msgs
Created initial commit 88012a2: commit 0
1 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 file
Created commit c4c4222: commit 1
1 files changed, 1 insertions(+), 1 deletions(-)
HEAD is now at 88012a2... commit 0
Created commit ac59201: commit 2
1 files changed, 1 insertions(+), 1 deletions(-)
HEAD is now at 88012a2... commit 0
Created commit 7504643: commit 3
1 files changed, 1 insertions(+), 1 deletions(-)
HEAD is now at 88012a2... commit 0
* ok 1: setup
* expecting success:
if git merge -$ c1
then
echo "[OOPS] -$ accepted"
false
fi &&
if git merge --no-such c1
then
echo "[OOPS] --no-such accepted"
false
fi &&
if git merge -s foobar c1
then
echo "[OOPS] -s foobar accepted"
false
fi &&
if git merge -s=foobar c1
then
echo "[OOPS] -s=foobar accepted"
false
fi &&
if git merge -m
then
echo "[OOPS] missing commit msg accepted"
false
fi &&
if git merge
then
echo "[OOPS] missing commit references accepted"
false
fi
error: unknown switch `$'
usage: git-merge [options] <remote>...
or: git-merge [options] <msg> HEAD <remote>
--summary show a diffstat at the end of the merge
-n, --no-summary don't show a diffstat at the end of the merge
--squash create a single commit instead of doing a merge
--commit perform a commit if the merge sucesses (default)
--ff allow fast forward (default)
-s, --strategy ... merge strategy to use
-m, --message ... message to be used for the merge commit (if any)
error: unknown option `no-such'
usage: git-merge [options] <remote>...
or: git-merge [options] <msg> HEAD <remote>
--summary show a diffstat at the end of the merge
-n, --no-summary don't show a diffstat at the end of the merge
--squash create a single commit instead of doing a merge
--commit perform a commit if the merge sucesses (default)
--ff allow fast forward (default)
-s, --strategy ... merge strategy to use
-m, --message ... message to be used for the merge commit (if any)
available strategies are: recur recursive octopus resolve stupid ours subtree
available strategies are: recur recursive octopus resolve stupid ours subtree
error: switch `m' requires a value
usage: git-merge [options] <remote>...
or: git-merge [options] <msg> HEAD <remote>
--summary show a diffstat at the end of the merge
-n, --no-summary don't show a diffstat at the end of the merge
--squash create a single commit instead of doing a merge
--commit perform a commit if the merge sucesses (default)
--ff allow fast forward (default)
-s, --strategy ... merge strategy to use
-m, --message ... message to be used for the merge commit (if any)
usage: git-merge [options] <remote>...
or: git-merge [options] <msg> HEAD <remote>
--summary show a diffstat at the end of the merge
-n, --no-summary don't show a diffstat at the end of the merge
--squash create a single commit instead of doing a merge
--commit perform a commit if the merge sucesses (default)
--ff allow fast forward (default)
-s, --strategy ... merge strategy to use
-m, --message ... message to be used for the merge commit (if any)
* ok 2: test option parsing
* expecting success:
git reset --hard c0 &&
git merge c1 &&
verify_merge file result.1 &&
verify_head "$c1"
HEAD is now at 88012a2... commit 0
Updating 88012a2..c4c4222
Fast forward
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 3: merge c0 with c1
* expecting success:
git reset --hard c1 &&
test_tick &&
git merge c2 &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 4: merge c1 with c2
* expecting success:
git reset --hard c1 &&
test_tick &&
git merge c2 c3 &&
verify_merge file result.1-5-9 msg.1-5-9 &&
verify_parents $c1 $c2 $c3
HEAD is now at c4c4222... commit 1
Trying simple merge with ac592016ba8d4558fadd810dde1c7187c18f126c
Simple merge did not work, trying automatic merge.
Auto-merging file
Trying simple merge with 7504643f2cc1367a09f53a0c45914fdeef1cb09b
Simple merge did not work, trying automatic merge.
Auto-merging file
Merge made by octopus.
file | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
* ok 5: merge c1 with c2 and c3
* expecting success:
git reset --hard c0 &&
git merge --no-commit c1 &&
verify_merge file result.1 &&
verify_head $c1
HEAD is now at 88012a2... commit 0
Updating 88012a2..c4c4222
Fast forward
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 6: merge c0 with c1 (no-commit)
* expecting success:
git reset --hard c1 &&
git merge --no-commit c2 &&
verify_merge file result.1-5 &&
verify_head $c1 &&
verify_mergeheads $c2
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Automatic merge went well; stopped before committing as requested
* ok 7: merge c1 with c2 (no-commit)
* expecting success:
git reset --hard c1 &&
git merge --no-commit c2 c3 &&
verify_merge file result.1-5-9 &&
verify_head $c1 &&
verify_mergeheads $c2 $c3
HEAD is now at c4c4222... commit 1
Trying simple merge with ac592016ba8d4558fadd810dde1c7187c18f126c
Simple merge did not work, trying automatic merge.
Auto-merging file
Trying simple merge with 7504643f2cc1367a09f53a0c45914fdeef1cb09b
Simple merge did not work, trying automatic merge.
Auto-merging file
Automatic merge went well; stopped before committing as requested
* ok 8: merge c1 with c2 and c3 (no-commit)
* expecting success:
git reset --hard c0 &&
git merge --squash c1 &&
verify_merge file result.1 &&
verify_head $c0 &&
verify_no_mergehead &&
verify_diff squash.1 .git/SQUASH_MSG "[OOPS] bad squash message"
HEAD is now at 88012a2... commit 0
Updating 88012a2..c4c4222
Fast forward
Squash commit -- not updating HEAD
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 9: merge c0 with c1 (squash)
* expecting success:
git reset --hard c1 &&
git merge --squash c2 &&
verify_merge file result.1-5 &&
verify_head $c1 &&
verify_no_mergehead &&
verify_diff squash.1-5 .git/SQUASH_MSG "[OOPS] bad squash message"
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committing as requested
* ok 10: merge c1 with c2 (squash)
* expecting success:
git reset --hard c1 &&
git merge --squash c2 c3 &&
verify_merge file result.1-5-9 &&
verify_head $c1 &&
verify_no_mergehead &&
verify_diff squash.1-5-9 .git/SQUASH_MSG "[OOPS] bad squash message"
HEAD is now at c4c4222... commit 1
Trying simple merge with ac592016ba8d4558fadd810dde1c7187c18f126c
Simple merge did not work, trying automatic merge.
Auto-merging file
Trying simple merge with 7504643f2cc1367a09f53a0c45914fdeef1cb09b
Simple merge did not work, trying automatic merge.
Auto-merging file
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committing as requested
* ok 11: merge c1 with c2 and c3 (squash)
* expecting success:
git reset --hard c1 &&
git config branch.master.mergeoptions "--no-commit" &&
git merge c2 &&
verify_merge file result.1-5 &&
verify_head $c1 &&
verify_mergeheads $c2
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Automatic merge went well; stopped before committing as requested
* ok 12: merge c1 with c2 (no-commit in config)
* expecting success:
git reset --hard c1 &&
git config branch.master.mergeoptions "--squash" &&
git merge c2 &&
verify_merge file result.1-5 &&
verify_head $c1 &&
verify_no_mergehead &&
verify_diff squash.1-5 .git/SQUASH_MSG "[OOPS] bad squash message"
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committing as requested
* ok 13: merge c1 with c2 (squash in config)
* expecting success:
git reset --hard c1 &&
git config branch.master.mergeoptions "-n" &&
test_tick &&
git merge --summary c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2 &&
if ! grep -e "^ file | *2 +-$" diffstat.txt
then
echo "[OOPS] diffstat was not generated"
fi
HEAD is now at c4c4222... commit 1
file | 2 +-
* ok 14: override config option -n
* expecting success:
git reset --hard c1 &&
git config branch.master.mergeoptions "--summary" &&
test_tick &&
git merge -n c2 >diffstat.txt &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2 &&
if grep -e "^ file | *2 +-$" diffstat.txt
then
echo "[OOPS] diffstat was generated"
false
fi
HEAD is now at c4c4222... commit 1
* ok 15: override config option --summary
* expecting success:
git reset --hard c1 &&
git config branch.master.mergeoptions "--no-commit" &&
test_tick &&
git merge --commit c2 &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 16: merge c1 with c2 (override --no-commit)
* expecting success:
git reset --hard c1 &&
git config branch.master.mergeoptions "--squash" &&
test_tick &&
git merge --no-squash c2 &&
verify_merge file result.1-5 msg.1-5 &&
verify_parents $c1 $c2
HEAD is now at c4c4222... commit 1
Merging HEAD with c2
Merging:
c4c4222 commit 1
ac59201 commit 2
found 1 common ancestor(s):
88012a2 commit 0
Auto-merged file
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 17: merge c1 with c2 (override --squash)
* expecting success:
git reset --hard c0 &&
test_tick &&
git merge --no-ff c1 &&
verify_merge file result.1 &&
verify_parents $c0 $c1
HEAD is now at 88012a2... commit 0
Merging HEAD with c1
Merging:
88012a2 commit 0
c4c4222 commit 1
found 1 common ancestor(s):
88012a2 commit 0
Merge made by recursive.
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 18: merge c0 with c1 (no-ff)
* expecting success:
git reset --hard c0 &&
git config branch.master.mergeoptions "--no-ff" &&
git merge --ff c1 &&
verify_merge file result.1 &&
verify_head $c1
HEAD is now at 88012a2... commit 0
Updating 88012a2..c4c4222
Fast forward
file | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 19: merge c0 with c1 (ff overrides no-ff)
* passed all 19 test(s)
*** t8001-annotate.sh ***
* expecting success: echo "1A quick brown fox jumps over the" >file &&
echo "lazy dog" >>file &&
git add file
GIT_AUTHOR_NAME="A" git commit -a -m "Initial."
Created initial commit 60a7a46: Initial.
1 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 1: prepare reference tree
* expecting success: check_count A 2
git annotate file
Author A (expected 2, attributed 2) good
* ok 2: check all lines blamed on A
* expecting success: echo "2A quick brown fox jumps over the" >>file &&
echo "lazy dog" >> file &&
GIT_AUTHOR_NAME="B" git commit -a -m "Second."
Created commit 1f43560: Second.
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 3: Setup new lines blamed on B
* expecting success: check_count A 2 B 2
git annotate file
Author A (expected 2, attributed 2) good
Author B (expected 2, attributed 2) good
* ok 4: Two lines blamed on A, two on B
* expecting success: git checkout -b branch1 master &&
echo "3A slow green fox jumps into the" >> file &&
echo "well." >> file &&
GIT_AUTHOR_NAME="B1" git commit -a -m "Branch1-1"
Switched to a new branch "branch1"
Created commit cf63cee: Branch1-1
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 5: merge-setup part 1
* expecting success: check_count A 2 B 2 B1 2
git annotate file
Author A (expected 2, attributed 2) good
Author B1 (expected 2, attributed 2) good
Author B (expected 2, attributed 2) good
* ok 6: Two lines blamed on A, two on B, two on B1
* expecting success: git checkout -b branch2 master &&
sed -e "s/2A quick brown/4A quick brown lazy dog/" < file > file.new &&
mv file.new file &&
GIT_AUTHOR_NAME="B2" git commit -a -m "Branch2-1"
Switched to a new branch "branch2"
Created commit 14b1bf5: Branch2-1
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 7: merge-setup part 2
* expecting success: check_count A 2 B 1 B2 1
git annotate file
Author A (expected 2, attributed 2) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 8: Two lines blamed on A, one on B, one on B2
* expecting success: git pull . branch1
Merging HEAD with cf63cee28325b062b172f1b9c9e4c16af9d12cf7
Merging:
14b1bf5 Branch2-1
cf63cee Branch1-1
found 1 common ancestor(s):
1f43560 Second.
Auto-merged file
Merge made by recursive.
file | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 9: merge-setup part 3
* expecting success: check_count A 2 B 1 B1 2 B2 1
git annotate file
Author A (expected 2, attributed 2) good
Author B1 (expected 2, attributed 2) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 10: Two lines blamed on A, one on B, two on B1, one on B2
* expecting success: check_count -h master A 2 B 2
git annotate file master
Author A (expected 2, attributed 2) good
Author B (expected 2, attributed 2) good
* ok 11: Annotating an old revision works
* expecting success: check_count -h master^ A 2
git annotate file master^
Author A (expected 2, attributed 2) good
* ok 12: Annotating an old revision works
* expecting success: echo "evil merge." >>file &&
git commit -a --amend
Created commit 63df2e5: Merge branch 'branch1' into branch2
* ok 13: merge-setup part 4
* expecting success: check_count A 2 B 1 B1 2 B2 1 "A U Thor" 1
git annotate file
Author A (expected 2, attributed 2) good
Author B1 (expected 2, attributed 2) good
Author A U Thor (expected 1, attributed 1) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 14: Two lines blamed on A, one on B, two on B1, one on B2, one on A U Thor
* expecting success: echo "incomplete" | tr -d "\012" >>file &&
GIT_AUTHOR_NAME="C" git commit -a -m "Incomplete"
Created commit 5cafc5e: Incomplete
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 15: an incomplete line added
* expecting success: check_count A 2 B 1 B1 2 B2 1 "A U Thor" 1 C 1
git annotate file
Author A (expected 2, attributed 2) good
Author B1 (expected 2, attributed 2) good
Author C (expected 1, attributed 1) good
Author A U Thor (expected 1, attributed 1) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 16: With incomplete lines.
* expecting success: mv file file.orig &&
sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" < file.orig > file &&
echo "incomplete" | tr -d "\012" >>file &&
GIT_AUTHOR_NAME="D" git commit -a -m "edit"
Created commit e763daa: edit
1 files changed, 1 insertions(+), 2 deletions(-)
* ok 17: some edit
* expecting success: check_count A 1 B 1 B1 1 B2 1 "A U Thor" 1 C 1 D 1
git annotate file
Author A (expected 1, attributed 1) good
Author B1 (expected 1, attributed 1) good
Author C (expected 1, attributed 1) good
Author D (expected 1, attributed 1) good
Author A U Thor (expected 1, attributed 1) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 18: some edit
* expecting success: [ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] && \
[ $(git annotate file master | awk "{print \$3}" | grep -c "^B$") -eq 2 ]
* ok 19: Annotating an old revision works
* passed all 19 test(s)
*** t8002-blame.sh ***
* expecting success: echo "1A quick brown fox jumps over the" >file &&
echo "lazy dog" >>file &&
git add file
GIT_AUTHOR_NAME="A" git commit -a -m "Initial."
Created initial commit 56a3e11: Initial.
1 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 1: prepare reference tree
* expecting success: check_count A 2
git blame -c file
* ok 2: check all lines blamed on A
* expecting success: echo "2A quick brown fox jumps over the" >>file &&
echo "lazy dog" >> file &&
GIT_AUTHOR_NAME="B" git commit -a -m "Second."
Created commit f2ba45c: Second.
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 3: Setup new lines blamed on B
* expecting success: check_count A 2 B 2
git blame -c file
Author B (expected 2, attributed 2) good
* ok 4: Two lines blamed on A, two on B
* expecting success: git checkout -b branch1 master &&
echo "3A slow green fox jumps into the" >> file &&
echo "well." >> file &&
GIT_AUTHOR_NAME="B1" git commit -a -m "Branch1-1"
Switched to a new branch "branch1"
Created commit c6111a4: Branch1-1
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 5: merge-setup part 1
* expecting success: check_count A 2 B 2 B1 2
git blame -c file
Author B1 (expected 2, attributed 2) good
Author B (expected 2, attributed 2) good
* ok 6: Two lines blamed on A, two on B, two on B1
* expecting success: git checkout -b branch2 master &&
sed -e "s/2A quick brown/4A quick brown lazy dog/" < file > file.new &&
mv file.new file &&
GIT_AUTHOR_NAME="B2" git commit -a -m "Branch2-1"
Switched to a new branch "branch2"
Created commit b92b647: Branch2-1
1 files changed, 1 insertions(+), 1 deletions(-)
* ok 7: merge-setup part 2
* expecting success: check_count A 2 B 1 B2 1
git blame -c file
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 8: Two lines blamed on A, one on B, one on B2
* expecting success: git pull . branch1
Merging HEAD with c6111a4ddfef37e8b6de7b2dc57800bfe9a23b98
Merging:
b92b647 Branch2-1
c6111a4 Branch1-1
found 1 common ancestor(s):
f2ba45c Second.
Auto-merged file
Merge made by recursive.
file | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
* ok 9: merge-setup part 3
* expecting success: check_count A 2 B 1 B1 2 B2 1
git blame -c file
Author B1 (expected 2, attributed 2) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 10: Two lines blamed on A, one on B, two on B1, one on B2
* expecting success: check_count -h master A 2 B 2
git blame -c file master
Author B (expected 2, attributed 2) good
* ok 11: Annotating an old revision works
* expecting success: check_count -h master^ A 2
git blame -c file master^
* ok 12: Annotating an old revision works
* expecting success: echo "evil merge." >>file &&
git commit -a --amend
Created commit 5ff2d91: Merge branch 'branch1' into branch2
* ok 13: merge-setup part 4
* expecting success: check_count A 2 B 1 B1 2 B2 1 "A U Thor" 1
git blame -c file
Author B1 (expected 2, attributed 2) good
Author A U Thor (expected 1, attributed 1) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 14: Two lines blamed on A, one on B, two on B1, one on B2, one on A U Thor
* expecting success: echo "incomplete" | tr -d "\012" >>file &&
GIT_AUTHOR_NAME="C" git commit -a -m "Incomplete"
Created commit 97f99dc: Incomplete
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 15: an incomplete line added
* expecting success: check_count A 2 B 1 B1 2 B2 1 "A U Thor" 1 C 1
git blame -c file
Author B1 (expected 2, attributed 2) good
Author C (expected 1, attributed 1) good
Author A U Thor (expected 1, attributed 1) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 16: With incomplete lines.
* expecting success: mv file file.orig &&
sed -e "s/^3A/99/" -e "/^1A/d" -e "/^incomplete/d" < file.orig > file &&
echo "incomplete" | tr -d "\012" >>file &&
GIT_AUTHOR_NAME="D" git commit -a -m "edit"
Created commit 9f96dca: edit
1 files changed, 1 insertions(+), 2 deletions(-)
* ok 17: some edit
* expecting success: check_count A 1 B 1 B1 1 B2 1 "A U Thor" 1 C 1 D 1
git blame -c file
Author B1 (expected 1, attributed 1) good
Author C (expected 1, attributed 1) good
Author D (expected 1, attributed 1) good
Author A U Thor (expected 1, attributed 1) good
Author B2 (expected 1, attributed 1) good
Author B (expected 1, attributed 1) good
* ok 18: some edit
* passed all 18 test(s)
*** t8003-blame.sh ***
* expecting success:
echo A A A A A >one &&
echo B B B B B >two &&
echo C C C C C >tres &&
echo ABC >mouse &&
git add one two tres mouse &&
test_tick &&
GIT_AUTHOR_NAME=Initial git commit -m Initial &&
cat one >uno &&
mv two dos &&
cat one >>tres &&
echo DEF >>mouse
git add uno dos tres mouse &&
test_tick &&
GIT_AUTHOR_NAME=Second git commit -a -m Second &&
echo GHIJK >>mouse &&
git add mouse &&
test_tick &&
GIT_AUTHOR_NAME=Third git commit -m Third &&
cat mouse >cow &&
git add cow &&
test_tick &&
GIT_AUTHOR_NAME=Fourth git commit -m Fourth &&
{
echo ABC
echo DEF
echo XXXX
echo GHIJK
} >cow &&
git add cow &&
test_tick &&
GIT_AUTHOR_NAME=Fifth git commit -m Fifth
Created initial commit 29f42a0: Initial
4 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 mouse
create mode 100644 one
create mode 100644 tres
create mode 100644 two
Created commit e31844f: Second
4 files changed, 3 insertions(+), 0 deletions(-)
rename two => dos (100%)
create mode 100644 uno
Created commit 8f74517: Third
1 files changed, 1 insertions(+), 0 deletions(-)
Created commit 42e9290: Fourth
1 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 cow
Created commit 06c189e: Fifth
1 files changed, 1 insertions(+), 0 deletions(-)
* ok 1: setup
* expecting success:
git blame uno | grep Second
e31844fa (Second 2005-04-07 15:14:13 -0700 1) A A A A A
* ok 2: straight copy without -C
* expecting success:
git blame dos | grep Initial
^29f42a0 two (Initial 2005-04-07 15:13:13 -0700 1) B B B B B
* ok 3: straight move without -C
* expecting success:
git blame -C1 uno | grep Second
e31844fa (Second 2005-04-07 15:14:13 -0700 1) A A A A A
* ok 4: straight copy with -C
* expecting success:
git blame -C1 dos | grep Initial
^29f42a0 two (Initial 2005-04-07 15:13:13 -0700 1) B B B B B
* ok 5: straight move with -C
* expecting success:
git blame -C -C1 uno | grep Initial
^29f42a0 one (Initial 2005-04-07 15:13:13 -0700 1) A A A A A
* ok 6: straight copy with -C -C
* expecting success:
git blame -C -C1 dos | grep Initial
^29f42a0 two (Initial 2005-04-07 15:13:13 -0700 1) B B B B B
* ok 7: straight move with -C -C
* expecting success:
git blame -L2 tres | grep Second
e31844fa (Second 2005-04-07 15:14:13 -0700 2) A A A A A
* ok 8: append without -C
* expecting success:
git blame -L2 -C1 tres | grep Second
e31844fa (Second 2005-04-07 15:14:13 -0700 2) A A A A A
* ok 9: append with -C
* expecting success:
git blame -L2 -C -C1 tres | grep Second
e31844fa (Second 2005-04-07 15:14:13 -0700 2) A A A A A
* ok 10: append with -C -C
* expecting success:
git blame -L2 -C -C -C1 tres | grep Initial
^29f42a0 one (Initial 2005-04-07 15:13:13 -0700 2) A A A A A
* ok 11: append with -C -C -C
* expecting success:
git blame -f -C -C1 HEAD^ -- cow | sed -e "$pick_fc" >current &&
{
echo mouse-Initial
echo mouse-Second
echo mouse-Third
} >expected &&
diff -u expected current
* ok 12: blame wholesale copy
* expecting success:
git blame -f -C -C1 HEAD -- cow | sed -e "$pick_fc" >current &&
{
echo mouse-Initial
echo mouse-Second
echo cow-Fifth
echo mouse-Third
} >expected &&
diff -u expected current
* ok 13: blame wholesale copy and more
* passed all 13 test(s)
*** t8004-blame.sh ***
* expecting success:
# Create the old file
echo "Old line" > file1 &&
git add file1 &&
git commit --author "Old Line <ol at localhost>" -m file1.a &&
# Branch
git checkout -b foo &&
# Do an ugly move and change
git rm file1 &&
echo "New line ..." > file2 &&
echo "... and more" >> file2 &&
git add file2 &&
git commit --author "U Gly <ug at localhost>" -m ugly &&
# Back to master and change something
git checkout master &&
echo "
bla" >> file1 &&
git commit --author "Old Line <ol at localhost>" -a -m file1.b &&
# Back to foo and merge master
git checkout foo &&
if git merge master; then
echo needed conflict here
exit 1
else
echo merge failed - resolving automatically
fi &&
echo "New line ...
... and more
bla
Even more" > file2 &&
git rm file1 &&
git commit --author "M Result <mr at localhost>" -a -m merged &&
# Back to master and change file1 again
git checkout master &&
sed s/bla/foo/ <file1 >X &&
rm file1 &&
mv X file1 &&
git commit --author "No Bla <nb at localhost>" -a -m replace &&
# Try to merge into foo again
git checkout foo &&
if git merge master; then
echo needed conflict here
exit 1
else
echo merge failed - test is setup
fi
Created initial commit de48878: file1.a
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file1
Switched to a new branch "foo"
rm 'file1'
Created commit 23a48a3: ugly
2 files changed, 2 insertions(+), 1 deletions(-)
delete mode 100644 file1
create mode 100644 file2
Switched to branch "master"
Created commit 0e679a9: file1.b
1 files changed, 3 insertions(+), 0 deletions(-)
Switched to branch "foo"
Merging HEAD with master
Merging:
23a48a3 ugly
0e679a9 file1.b
found 1 common ancestor(s):
de48878 file1.a
CONFLICT (delete/modify): file1 deleted in HEAD and modified in master. Version master of file1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
merge failed - resolving automatically
rm 'file1'
rm 'file1'
Created commit 2cad00d: merged
Switched to branch "master"
Created commit a04bf33: replace
1 files changed, 1 insertions(+), 1 deletions(-)
Switched to branch "foo"
Merging HEAD with master
Merging:
2cad00d merged
a04bf33 replace
found 1 common ancestor(s):
0e679a9 file1.b
CONFLICT (delete/modify): file1 deleted in HEAD and modified in master. Version master of file1 left in tree.
Automatic merge failed; fix conflicts and then commit the result.
merge failed - test is setup
* ok 1: setup first case
* expecting success:
git blame file2
23a48a30 (U Gly 2008-07-05 10:13:36 +0000 1) New line ...
23a48a30 (U Gly 2008-07-05 10:13:36 +0000 2) ... and more
2cad00d2 (M Result 2008-07-05 10:13:36 +0000 3)
2cad00d2 (M Result 2008-07-05 10:13:36 +0000 4) bla
2cad00d2 (M Result 2008-07-05 10:13:36 +0000 5) Even more
* ok 2: blame runs on unconflicted file while other file has conflicts
* expecting success:
git blame file1
00000000 (Not Committed Yet 2008-07-05 10:13:36 +0000 1) Old line
00000000 (Not Committed Yet 2008-07-05 10:13:36 +0000 2)
00000000 (Not Committed Yet 2008-07-05 10:13:36 +0000 3)
00000000 (Not Committed Yet 2008-07-05 10:13:36 +0000 4) foo
* ok 3: blame runs on conflicted file in stages 1,3
* passed all 3 test(s)
*** t9001-send-email.sh ***
* expecting success: echo "1A quick brown fox jumps over the" >file &&
echo "lazy dog" >>file &&
git add file &&
GIT_AUTHOR_NAME="A" git commit -a -m "Initial."
Created initial commit 31b7cd8: Initial.
1 files changed, 2 insertions(+), 0 deletions(-)
create mode 100644 file
* ok 1: prepare reference tree
* expecting success: (echo "#!/bin/sh"
echo shift
echo for a
echo do
echo " echo \"!\$a!\""
echo "done >commandline"
echo "cat > msgtxt"
) >fake.sendmail &&
chmod +x ./fake.sendmail &&
git add fake.sendmail &&
GIT_AUTHOR_NAME="A" git commit -a -m "Second."
Created commit ac7b8da: Second.
1 files changed, 7 insertions(+), 0 deletions(-)
create mode 100755 fake.sendmail
* ok 2: Setup helper tool
* expecting success:
patches=`git format-patch -n HEAD^1`
* ok 3: Extract patches
* expecting success:
git send-email --from="Example <nobody at example.com>" --to=nobody at example.com --smtp-server="$(pwd)/fake.sendmail" $patches 2>errors
0001-Second.patch
(mbox) Adding cc: A <author at example.com> from line 'From: A <author at example.com>'
OK. Log says:
Sendmail: /build/buildd/git-core-1.5.4.3/t/trash/fake.sendmail -i nobody at example.com author at example.com
From: Example <nobody at example.com>
To: nobody at example.com
Cc: A <author at example.com>
Subject: [PATCH 1/1] Second.
Date: Sat, 5 Jul 2008 10:13:36 +0000
Message-Id: <1215252816-11570-1-git-send-email-nobody at example.com>
X-Mailer: git-send-email 1.5.4.3
Result: OK
* ok 4: Send patches
* expecting success: diff commandline expected
* ok 5: Verify commandline
* expecting success:
git send-email \
--dry-run \
--from="Example <from at example.com>" \
--to=to at example.com \
--cc=cc at example.com \
--bcc=bcc at example.com \
--in-reply-to="<unique-message-id at example.com>" \
--smtp-server relay.example.com \
$patches |
sed -e "s/^\(Date:\).*/ DATE-STRING/" \
-e "s/^\(Message-Id:\).*/ MESSAGE-ID-STRING/" \
-e "s/^\(X-Mailer:\).*/ X-MAILER-STRING/" \
>actual-show-all-headers &&
diff -u expected-show-all-headers actual-show-all-headers
* ok 6: Show all headers
* expecting success:
rm -f commandline &&
cp $patches longline.patch &&
echo $z512$z512 >>longline.patch &&
! git send-email \
--from="Example <nobody at example.com>" \
--to=nobody at example.com \
--smtp-server="$(pwd)/fake.sendmail" \
$patches longline.patch \
2>errors &&
grep longline.patch errors
fatal: longline.patch: 27: patch contains a line longer than 998 characters
* ok 7: reject long lines
* expecting success:
! test -e commandline
* ok 8: no patch was sent
* expecting success:
git send-email \
--from="Example <nobody at example.com>" \
--to=nobody at example.com \
--smtp-server="$(pwd)/fake.sendmail" \
--no-validate \
$patches longline.patch \
2>errors
0001-Second.patch
longline.patch
(mbox) Adding cc: A <author at example.com> from line 'From: A <author at example.com>'
OK. Log says:
Sendmail: /build/buildd/git-core-1.5.4.3/t/trash/fake.sendmail -i nobody at example.com author at example.com
From: Example <nobody at example.com>
To: nobody at example.com
Cc: A <author at example.com>
Subject: [PATCH 1/1] Second.
Date: Sat, 5 Jul 2008 10:13:36 +0000
Message-Id: <1215252817-11656-1-git-send-email-nobody at example.com>
X-Mailer: git-send-email 1.5.4.3
Result: OK
(mbox) Adding cc: A <author at example.com> from line 'From: A <author at example.com>'
OK. Log says:
Sendmail: /build/buildd/git-core-1.5.4.3/t/trash/fake.sendmail -i nobody at example.com author at example.com
From: Example <nobody at example.com>
To: nobody at example.com
Cc: A <author at example.com>
Subject: [PATCH 1/1] Second.
Date: Sat, 5 Jul 2008 10:13:37 +0000
Message-Id: <1215252817-11656-2-git-send-email-nobody at example.com>
X-Mailer: git-send-email 1.5.4.3
In-Reply-To: <1215252817-11656-1-git-send-email-nobody at example.com>
References: <1215252817-11656-1-git-send-email-nobody at example.com>
Result: OK
* ok 9: allow long lines with --no-validate
* passed all 9 test(s)
*** t9100-git-svn-basic.sh ***
define NO_SVN_TESTS to skip git-svn tests
* expecting success:
mkdir import &&
cd import &&
echo foo > foo &&
ln -s foo foo.link
mkdir -p dir/a/b/c/d/e &&
echo 'deep dir' > dir/a/b/c/d/e/file &&
mkdir bar &&
echo 'zzz' > bar/zzz &&
echo '#!/bin/sh' > exec.sh &&
chmod +x exec.sh &&
svn import -m 'import for git-svn' . file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo >/dev/null &&
cd .. &&
rm -rf import &&
git-svn init file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo
* ok 1: initialize git-svn
* expecting success: git-svn fetch
A foo.link
A foo
A bar/zzz
A exec.sh
A dir/a/b/c/d/e/file
r1 = 9a1693c4c46f509dce7dec0d0ddf3c95e258d2de (git-svn)
Checked out HEAD:
file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo r1
* ok 2: import an SVN revision into git
* expecting success: svn co file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/foo.link
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/foo
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/bar
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/bar/zzz
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec.sh
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a/b
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a/b/c
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a/b/c/d
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a/b/c/d/e
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a/b/c/d/e/file
Checked out revision 1.
* ok 3: checkout from svn
* expecting success:
git checkout -f -b mybranch remotes/git-svn &&
mv dir/a/b/c/d/e/file dir/file &&
cp dir/file file &&
git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
git commit -m 'try a deep --rmdir with a commit' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch &&
svn up '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree' &&
test -d '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/dir && test ! -d '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/dir/a
Switched to a new branch "mybranch"
Created commit 5ea6eef: try a deep --rmdir with a commit
2 files changed, 0 insertions(+), 0 deletions(-)
copy dir/{a/b/c/d/e => }/file (100%)
rename dir/a/b/c/d/e/file => file (100%)
C dir/a/b/c/d/e/file => dir/file
R dir/a/b/c/d/e/file => file
D+ dir/a/b/c/d/e/
D+ dir/a/b/c/d/
D+ dir/a/b/c/
D+ dir/a/b/
D+ dir/a/
A file
D dir/a/b/c/d/e/file
D dir/a/
A dir/file
W: -empty_dir: dir/a
r2 = 165438792ea861747e38815e4d93ddfcbb8933a0 (git-svn)
Done committing 1 revisions to SVN
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/file
D /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/a
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/dir/file
Updated to revision 2.
* ok 4: try a deep --rmdir with a commit
* expecting failure:
mkdir dir/new_file &&
mv dir/file dir/new_file/file &&
mv dir/new_file dir/file &&
git update-index --remove dir/file &&
git update-index --add dir/file/file &&
git commit -m 'detect node change from file to directory #1' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch
Created commit b34c4c2: detect node change from file to directory #1
1 files changed, 0 insertions(+), 0 deletions(-)
rename dir/{ => file}/file (100%)
dir/file already exists in repository at r2 and it is not a directory (file/1)
* ok 5: detect node change from file to directory #1
* expecting failure:
rm -rf dir '/build/buildd/git-core-1.5.4.3/t/trash/.git'/index &&
git checkout -f -b mybranch2 remotes/git-svn &&
mv bar/zzz zzz &&
rm -rf bar &&
mv zzz bar &&
git update-index --remove -- bar/zzz &&
git update-index --add -- bar &&
git commit -m 'detect node change from directory to file #1' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch2
Switched to a new branch "mybranch2"
Created commit 266d016: detect node change from directory to file #1
1 files changed, 0 insertions(+), 0 deletions(-)
rename bar/zzz => bar (100%)
Transaction is out of date: Directory '/bar' is out of date at /build/buildd/git-core-1.5.4.3/t/../git-svn line 2495
* ok 6: detect node change from directory to file #1
* expecting failure:
rm -f '/build/buildd/git-core-1.5.4.3/t/trash/.git'/index &&
git checkout -f -b mybranch3 remotes/git-svn &&
rm bar/zzz &&
git update-index --remove bar/zzz &&
mkdir bar/zzz &&
echo yyy > bar/zzz/yyy &&
git update-index --add bar/zzz/yyy &&
git commit -m 'detect node change from file to directory #2' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch3
Switched to a new branch "mybranch3"
Created commit 0d6aeb7: detect node change from file to directory #2
2 files changed, 1 insertions(+), 1 deletions(-)
delete mode 100644 bar/zzz
create mode 100644 bar/zzz/yyy
D bar/zzz
bar/zzz already exists in repository at r2 and it is not a directory (file/1)
* ok 7: detect node change from file to directory #2
* expecting failure:
rm -f '/build/buildd/git-core-1.5.4.3/t/trash/.git'/index &&
git checkout -f -b mybranch4 remotes/git-svn &&
rm -rf dir &&
git update-index --remove -- dir/file &&
touch dir &&
echo asdf > dir &&
git update-index --add -- dir &&
git commit -m 'detect node change from directory to file #2' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch4
Switched to a new branch "mybranch4"
Created commit 3caa394: detect node change from directory to file #2
2 files changed, 1 insertions(+), 1 deletions(-)
create mode 100644 dir
delete mode 100644 dir/file
D dir/file
Item already exists in filesystem: File already exists: filesystem '/build/buildd/git-core-1.5.4.3/t/trash/svnrepo/db', transaction '2-5', path '/dir' at /build/buildd/git-core-1.5.4.3/t/../git-svn line 2495
* ok 8: detect node change from directory to file #2
* expecting success:
rm -f '/build/buildd/git-core-1.5.4.3/t/trash/.git'/index &&
git checkout -f -b mybranch5 remotes/git-svn &&
chmod -x exec.sh &&
git update-index exec.sh &&
git commit -m 'remove executable bit from a file' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree' &&
test ! -x '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/exec.sh
Switched to a new branch "mybranch5"
Created commit 8556381: remove executable bit from a file
0 files changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 exec.sh
M exec.sh
M exec.sh
r3 = db8bcd66d0e1e5187d768af035da94e5671d5516 (git-svn)
Done committing 1 revisions to SVN
UU /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec.sh
Updated to revision 3.
* ok 9: remove executable bit from a file
* expecting success:
chmod +x exec.sh &&
git update-index exec.sh &&
git commit -m 'add executable bit back file' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree' &&
test -x '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/exec.sh
Created commit 1e2d292: add executable bit back file
0 files changed, 0 insertions(+), 0 deletions(-)
mode change 100644 => 100755 exec.sh
M exec.sh
M exec.sh
r4 = 4caba7a76c82624a5c5a9b6758935c67b2825a15 (git-svn)
Done committing 1 revisions to SVN
UU /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec.sh
Updated to revision 4.
* ok 10: add executable bit back file
* expecting success:
rm exec.sh &&
ln -s bar/zzz exec.sh &&
git update-index exec.sh &&
git commit -m 'executable file becomes a symlink to bar/zzz (file)' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree' &&
test -L '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/exec.sh
Created commit 03a4dba: executable file becomes a symlink to bar/zzz (file)
1 files changed, 1 insertions(+), 1 deletions(-)
rewrite exec.sh (100%)
mode change 100755 => 120000
T exec.sh
M exec.sh
r5 = dc578dd71d11daa0decf34b6fc017f87021f721a (git-svn)
Done committing 1 revisions to SVN
UU /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec.sh
Updated to revision 5.
* ok 11: executable file becomes a symlink to bar/zzz (file)
* expecting success:
chmod +x bar/zzz &&
ln -s bar/zzz exec-2.sh &&
git update-index --add bar/zzz exec-2.sh &&
git commit -m 'new symlink is added to a file that was also just made executable' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree' &&
test -x '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/bar/zzz &&
test -L '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/exec-2.sh
Created commit 46ec14c: new symlink is added to a file that was also just made executable
1 files changed, 1 insertions(+), 0 deletions(-)
mode change 100644 => 100755 bar/zzz
create mode 120000 exec-2.sh
C exec.sh => exec-2.sh
M bar/zzz
M bar/zzz
A exec-2.sh
r6 = 39a0f87127958a96c6190f5ad2f3f5b2cd99259b (git-svn)
Done committing 1 revisions to SVN
UU /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/bar/zzz
A /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec-2.sh
Updated to revision 6.
* ok 12: new symlink is added to a file that was also just made executable
* expecting success:
echo git help > help || true &&
rm exec-2.sh &&
cp help exec-2.sh &&
git update-index exec-2.sh &&
git commit -m 'modify a symlink to become a file' &&
git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree' &&
test -f '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/exec-2.sh &&
test ! -L '/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree'/exec-2.sh &&
git diff help /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec-2.sh
Created commit 81fb3e1: modify a symlink to become a file
1 files changed, 1 insertions(+), 1 deletions(-)
rewrite exec-2.sh (100%)
mode change 120000 => 100644
T exec-2.sh
M exec-2.sh
r7 = c92ce43478db742bebad1eef219d0de98e632ded (git-svn)
Done committing 1 revisions to SVN
UU /build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec-2.sh
Updated to revision 7.
diff --git a/help b/build/buildd/git-core-1.5.4.3/t/trash/.git/svn/git-svn/svn-tree/exec-2.sh
* ok 13: modify a symlink to become a file
UTF-8 locale not set, test skipped ()
* expecting success: git-svn init file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo && git-svn fetch &&
git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
git diff a b
Using existing [svn-remote "svn"]
A foo.link
A foo
A bar/zzz
A exec.sh
A dir/a/b/c/d/e/file
r1 = 9a1693c4c46f509dce7dec0d0ddf3c95e258d2de (alt)
A file
D dir/a/b/c/d/e/file
D dir/a/
A dir/file
W: -empty_dir: dir/a
r2 = 1c0d6ac4c25964defdcee6e710c22fe57e38c88b (alt)
M exec.sh
r3 = 7c28fc02fc96460317198e0ec0aca665106bc181 (alt)
M exec.sh
r4 = dc16beca41a198ef8d17d2eda3fcc80a01248010 (alt)
M exec.sh
r5 = 15afc5f29753c1a3b9a0cd5df62aefcd9fbe897b (alt)
M bar/zzz
A exec-2.sh
r6 = cf9469ab0db9d94abf075b514f2c1e2cf0b305f1 (alt)
M exec-2.sh
r7 = db9a44c08d84ec047693f2fd444f68a4d0579c41 (alt)
* ok 14: test fetch functionality (svn => git) with alternate GIT_SVN_ID
* expecting success: git diff a expected
* ok 15: check imported tree checksums expected tree checksums
* expecting failure:
git config --add svn-remote.svn.fetch bar:refs/remotes/git-svn &&
git-svn migrate
Remote ref refs/remote/git-svn is tracked by
"svn-remote.svn.fetch=bar:refs/remotes/git-svn"
and
"svn-remote.svn.fetch=:refs/remotes/git-svn"
Please resolve this ambiguity in your git configuration file before continuing
* ok 16: exit if remote refs are ambigious
* expecting failure:
svnadmin create /build/buildd/git-core-1.5.4.3/t/trash/svnrepo2 &&
svn mkdir -m 'mkdir bar' file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo2/bar &&
git config --unset svn-remote.svn.fetch '^bar:refs/remotes/git-svn$' &&
git-svn init file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo2/bar
Committed revision 1.
svn-remote.svn.url already set: file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo
wanted to set to: file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo2/bar
* ok 17: exit if init-ing a would clobber a URL
* expecting success:
git-svn init --minimize-url -i bar file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo/bar &&
git config --get svn-remote.svn.fetch '^bar:refs/remotes/bar$' &&
git config --get svn-remote.svn.fetch '^:refs/remotes/git-svn$'
Using existing [svn-remote "svn"]
Using higher level of URL: file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo/bar => file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo
bar:refs/remotes/bar
:refs/remotes/git-svn
* ok 18: init allows us to connect to another directory in the same repo
* expecting success:
git-svn fetch -i bar &&
git checkout -b my-bar refs/remotes/bar &&
echo abc > d &&
git update-index --add d &&
git commit -m '/bar/d should be in the log' &&
git-svn dcommit -i bar &&
test -z "`git diff refs/heads/my-bar refs/remotes/bar`" &&
mkdir newdir &&
echo new > newdir/dir &&
git update-index --add newdir/dir &&
git commit -m 'add a new directory' &&
git-svn dcommit -i bar &&
test -z "`git diff refs/heads/my-bar refs/remotes/bar`" &&
echo foo >> newdir/dir &&
git update-index newdir/dir &&
git commit -m 'modify a file in new directory' &&
git-svn dcommit -i bar &&
test -z "`git diff refs/heads/my-bar refs/remotes/bar`"
A zzz
r1 = 37b754573baea4f807ebd9c4b5448ca78b91d9c7 (bar)
M zzz
r6 = 14067837b8a4607988dc2d8f9cfb2c39eeebebe5 (bar)
Switched to a new branch "my-bar"
Created commit 7dc8d40: /bar/d should be in the log
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 d
Committing to file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo/bar ...
A d
Committed r8
A d
r8 = 7b2075f25c5d555ba268024cd2ce24b9a8ccfa92 (bar)
No changes between current HEAD and refs/remotes/bar
Resetting to the latest refs/remotes/bar
Created commit 87750b4: add a new directory
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 newdir/dir
Committing to file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo/bar ...
A newdir/dir
Committed r9
A newdir/dir
r9 = 6273e6547a23a2963b91d74f0b4121582ae26904 (bar)
No changes between current HEAD and refs/remotes/bar
Resetting to the latest refs/remotes/bar
Created commit 662e33c: modify a file in new directory
1 files changed, 1 insertions(+), 0 deletions(-)
Committing to file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo/bar ...
M newdir/dir
Committed r10
M newdir/dir
r10 = 610c70058f2d4f07d99f83a318f4aa569e7f1f75 (bar)
No changes between current HEAD and refs/remotes/bar
Resetting to the latest refs/remotes/bar
* ok 19: able to dcommit to a subdirectory
* expecting success:
echo cba > d &&
git update-index d &&
git commit -m 'update /bar/d' &&
git-svn set-tree -i bar HEAD &&
test -z "`git diff refs/heads/my-bar refs/remotes/bar`"
Created commit e627489: update /bar/d
1 files changed, 1 insertions(+), 1 deletions(-)
M d
M d
r11 = 89b847acbc2a54bff2cd7f796c101cc2cd03a658 (bar)
Done committing 1 revisions to SVN
* ok 20: able to set-tree to a subdirectory
* passed all 20 test(s)
*** t9101-git-svn-props.sh ***
* expecting success: svn co file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo test_wc
A test_wc/empty_lf
A test_wc/lf
A test_wc/empty_cr
A test_wc/kw.c
A test_wc/ne_lf
A test_wc/cr
A test_wc/empty_crlf
A test_wc/crlf
A test_wc/ne_cr
A test_wc/ne_crlf
A test_wc/empty
Checked out revision 1.
* ok 1: checkout working copy from svn
* expecting success: cd test_wc &&
echo Greetings >> kw.c &&
poke kw.c &&
svn commit -m "Not yet an Id" &&
echo Hello world >> kw.c &&
poke kw.c &&
svn commit -m "Modified file, but still not yet an Id" &&
svn propset svn:keywords Id kw.c &&
poke kw.c &&
svn commit -m "Propset Id" &&
cd ..
Sending kw.c
Transmitting file data .
Committed revision 2.
Sending kw.c
Transmitting file data .
Committed revision 3.
property 'svn:keywords' set on 'kw.c'
Sending kw.c
Committed revision 4.
* ok 2: setup some commits to svn
* expecting success: git-svn init file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo
* ok 3: initialize git-svn
* expecting success: git-svn fetch
A empty_lf
A lf
A empty_cr
A kw.c
A ne_lf
A cr
A empty_crlf
A crlf
A ne_cr
A ne_crlf
A empty
r1 = 9d6f0049184e6f6265db5b460e38defb065276bd (git-svn)
M kw.c
r2 = c4dee0462d5443177bcd59c3f2c2d2087ee6caa0 (git-svn)
M kw.c
r3 = 581bde3839b8f1b22bbae73a978ec2e62644b694 (git-svn)
M kw.c
r4 = 5f1a3d3268e01ec7ecf92e4a1795235ba9317b56 (git-svn)
Checked out HEAD:
file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo r4
* ok 4: fetch revisions from svn
* expecting success: git checkout -b mybranch remotes/git-svn &&
echo Hi again >> kw.c &&
git commit -a -m "test keywords ignoring" &&
git-svn set-tree remotes/git-svn..mybranch &&
git pull . remotes/git-svn
Switched to a new branch "mybranch"
Created commit 141967f: test keywords ignoring
1 files changed, 1 insertions(+), 0 deletions(-)
M kw.c
M kw.c
r5 = 2060b45980a32c6ad06cffe722e9f6c6b0ffde08 (git-svn)
Done committing 1 revisions to SVN
Updating 141967f..2060b45
Fast forward
* ok 5: test svn:keywords ignoring
* expecting success: test '/* $Id$ */' = '/* $Id$ */'
* ok 6: raw $Id$ found in kw.c
* expecting success: cd test_wc &&
svn propset svn:eol-style CR empty &&
svn propset svn:eol-style CR crlf &&
svn propset svn:eol-style CR ne_crlf &&
svn commit -m "propset CR on crlf files" &&
cd ..
property 'svn:eol-style' set on 'empty'
property 'svn:eol-style' set on 'crlf'
property 'svn:eol-style' set on 'ne_crlf'
Sending crlf
Sending empty
Sending ne_crlf
Transmitting file data ..
Committed revision 6.
* ok 7: propset CR on crlf files
* expecting success: git-svn fetch &&
git pull . remotes/git-svn &&
svn co file:///build/buildd/git-core-1.5.4.3/t/trash/svnrepo new_wc
M crlf
M ne_crlf
M empty
r6 = 4c0af0c9767a8070a12b5195ea7c3d797d00b499 (git-svn)
Updating 2060b45..4c0af0c
Fast forward
crlf | 3 +--
ne_crlf | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
A new_wc/empty_lf
A new_wc/lf
A new_wc/empty_cr
A new_wc/kw.c
A new_wc/ne_lf
A new_wc/cr
A new_wc/empty_crlf
A new_wc/crlf
A new_wc/ne_cr
A new_wc/ne_crlf
A new_wc/empty
Checked out revision 6.
* ok 8: fetch and pull latest from svn and checkout a new wc
* expecting success: cmp crlf new_wc/crlf
* ok 9: Comparing crlf
* expecting success: cmp ne_crlf new_wc/ne_crlf
* ok 10: Comparing ne_crlf
* expecting success: cmp lf new_wc/lf
* ok 11: Comparing lf
* expecting success: cmp ne_lf new_wc/ne_lf
* ok 12: Comparing ne_lf
* expecting success: cmp cr new_wc/cr
* ok 13: Comparing cr
* expecting success: cmp ne_cr new_wc/ne_cr
* ok 14: Comparing ne_cr
* expecting success: cmp empty_cr new_wc/empty_cr
* ok 15: Comparing empty_cr
* expecting success: cmp empty_lf new_wc/empty_lf
* ok 16: Comparing empty_lf
* expecting success: cmp empty new_wc/empty
* ok 17: Comparing empty
* expecting success: cmp empty_crlf new_wc/empty_crlf
* ok 18: Comparing empty_crlf
* expecting success: svn propset svn:eol-style CRLF cr &&
svn propset svn:eol-style CRLF ne_cr &&
svn propset svn:keywords Id cr &&
svn propset svn:keywords Id ne_cr &&
svn commit -m "propset CRLF on cr files"
property 'svn:eol-style' set on 'cr'
property 'svn:eol-style' set on 'ne_cr'
property 'svn:keywords' set on 'cr'
property 'svn:keywords' set on 'ne_cr'
Sending cr
Sending ne_cr
Transmitting file data ..
Committed revision 7.
* ok 19: Set CRLF on cr files
* expecting success: git-svn fetch && git pull . remotes/git-svn
M cr
M ne_cr
r7 = 52dfc47e572f720ac7a2c828e8e0f1be5687678e (git-svn)
Updating 4c0af0c..52dfc47
Fast forward
cr | 4 +++-
ne_cr | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
* ok 20: fetch and pull latest from svn
* expecting success: test 'f39bd49beefa1dff130e47c7a24777dfc3657ba2' = 'f39bd49beefa1dff130e47c7a24777dfc3657ba2'
* ok 21: CRLF + $Id$
* expecting success: test '41c5e77993f143876592cd19b5e9a6f6d2e4ff8a' = '41c5e77993f143876592cd19b5e9a6f6d2e4ff8a'
* ok 22: CRLF + $Id$ (no newline)
* expecting success:
cd test_wc &&
mkdir -p deeply/nested/directory &&
touch deeply/nested/directory/.keep &&
svn add deeply &&
svn up &&
svn propset -R svn:ignore 'no-such-file*' .
svn commit -m 'propset svn:ignore'
cd .. &&
git-svn show-ignore > show-ignore.got &&
cmp show-ignore.expect show-ignore.got
A deeply
A deeply/nested
A deeply/nested/directory
A deeply/nested/directory/.keep
U kw.c
Updated to revision 7.
property 'svn:ignore' set (recursively) on '.'
Sending .
Adding deeply
Adding deeply/nested
Adding deeply/nested/directory
Adding deeply/nested/directory/.keep
Transmitting file data .
Committed revision 8.
perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
Aborted
* FAIL 23: test show-ignore
cd test_wc &&
mkdir -p deeply/nested/directory &&
touch deeply/nested/directory/.keep &&
svn add deeply &&
svn up &&
svn propset -R svn:ignore 'no-such-file*' .
svn commit -m 'propset svn:ignore'
cd .. &&
git-svn show-ignore > show-ignore.got &&
cmp show-ignore.expect show-ignore.got
* expecting success:
git-svn fetch && git pull . remotes/git-svn &&
git-svn create-ignore &&
cmp ./.gitignore create-ignore.expect &&
cmp ./deeply/.gitignore create-ignore.expect &&
cmp ./deeply/nested/.gitignore create-ignore.expect &&
cmp ./deeply/nested/directory/.gitignore create-ignore.expect &&
git ls-files -s | grep gitignore | cmp - create-ignore-index.expect
A deeply/nested/directory/.keep
r8 = 50a2f652c1feed570e95c31d00e212d68b18bfdc (git-svn)
Updating 52dfc47..50a2f65
Fast forward
0 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 deeply/nested/directory/.keep
perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
Aborted
* FAIL 24: test create-ignore
git-svn fetch && git pull . remotes/git-svn &&
git-svn create-ignore &&
cmp ./.gitignore create-ignore.expect &&
cmp ./deeply/.gitignore create-ignore.expect &&
cmp ./deeply/nested/.gitignore create-ignore.expect &&
cmp ./deeply/nested/directory/.gitignore create-ignore.expect &&
git ls-files -s | grep gitignore | cmp - create-ignore-index.expect
* expecting success:
git-svn propget svn:ignore . | cmp - prop.expect &&
cd deeply &&
git-svn propget svn:ignore . | cmp - ../prop.expect &&
git-svn propget svn:entry:committed-rev nested/directory/.keep | cmp - ../prop2.expect &&
git-svn propget svn:ignore .. | cmp - ../prop.expect &&
git-svn propget svn:ignore nested/ | cmp - ../prop.expect &&
git-svn propget svn:ignore ./nested | cmp - ../prop.expect &&
git-svn propget svn:ignore .././deeply/nested | cmp - ../prop.expect
perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
Aborted
cmp: EOF on -
* FAIL 25: test propget
git-svn propget svn:ignore . | cmp - prop.expect &&
cd deeply &&
git-svn propget svn:ignore . | cmp - ../prop.expect &&
git-svn propget svn:entry:committed-rev nested/directory/.keep | cmp - ../prop2.expect &&
git-svn propget svn:ignore .. | cmp - ../prop.expect &&
git-svn propget svn:ignore nested/ | cmp - ../prop.expect &&
git-svn propget svn:ignore ./nested | cmp - ../prop.expect &&
git-svn propget svn:ignore .././deeply/nested | cmp - ../prop.expect
* expecting success:
git-svn proplist . | cmp - prop.expect &&
git-svn proplist nested/directory/.keep | cmp - prop2.expect
perl: /build/buildd/subversion-1.5.0dfsg1/subversion/libsvn_ra/ra_loader.c:674: svn_ra_get_dir: Assertion `*path != '/'' failed.
Aborted
cmp: EOF on -
* FAIL 26: test proplist
git-svn proplist . | cmp - prop.expect &&
git-svn proplist nested/directory/.keep | cmp - prop2.expect
* failed 4 among 26 test(s)
make[2]: *** [t9101-git-svn-props.sh] Error 1
make[2]: Leaving directory `/build/buildd/git-core-1.5.4.3/t'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/build/buildd/git-core-1.5.4.3'
make: *** [build-arch-stamp] Error 2
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
******************************************************************************
Build finished at 20080705-1114
FAILED [dpkg-buildpackage died]
Purging chroot-intrepid-autotest/build/buildd/git-core-1.5.4.3
------------------------------------------------------------------------------
/usr/bin/sudo dpkg --root=/home/buildd/build-intrepid-autotest/chroot-intrepid-autotest --purge unzip readline-common gettext zlib1g-dev python2.5 openssl libgcrypt11-dev libmysqlclient15off libopencdk10 libnet-daemon-perl liblzo2-2 update-inetd libssl0.9.8 libpq5 libkadm55 libexpat1-dev libldap-2.4-2 subversion libaprutil1 libgcrypt11 libidn11 libkeyutils1 sgml-base python docbook-xml libgnutls26 libxslt1.1 libsvn1 libgnutls-dev libsasl2-modules libexpat1 libneon27-gnutls asciidoc xsltproc mysql-common docbook-xsl libkrb53 libglib2.0-0 mime-support libsasl2-2 libldap2-dev libtasn1-3 libdbi-perl sgml-data comerr-dev libxml2-utils libgpg-error-dev libdbd-sqlite3-perl libkrb5-dev libapr1 libxml2 libcurl3-gnutls pkg-config libsvn-perl xml-core libtasn1-3-dev libgpg-error0 ca-certificates libcurl4-gnutls-dev gettext-base libplrpc-perl xmlto cvs libreadline5 libgnutls13 libsqlite3-0 libidn11-dev libncursesw5 tcl8.4
(Reading database ... 14663 files and directories currently installed.)
Removing unzip ...
Removing gettext ...
Removing libexpat1-dev ...
Removing subversion ...
Purging configuration files for subversion ...
Removing asciidoc ...
Purging configuration files for asciidoc ...
Removing libdbd-sqlite3-perl ...
Removing libsvn-perl ...
Purging configuration files for libsvn-perl ...
Removing libcurl4-gnutls-dev ...
Removing gettext-base ...
Removing xmlto ...
Removing cvs ...
Purging configuration files for cvs ...
Removing libidn11-dev ...
Removing tcl8.4 ...
Purging configuration files for tcl8.4 ...
Removing update-inetd ...
Purging configuration files for update-inetd ...
Removing python ...
Purging configuration files for python ...
Removing docbook-xml ...
Purging configuration files for docbook-xml ...
Removing libsvn1 ...
Purging configuration files for libsvn1 ...
Removing libgnutls-dev ...
Removing libneon27-gnutls ...
Purging configuration files for libneon27-gnutls ...
Removing xsltproc ...
Removing docbook-xsl ...
Purging configuration files for docbook-xsl ...
Removing libldap2-dev ...
Removing libdbi-perl ...
Removing sgml-data ...
Purging configuration files for sgml-data ...
Removing libxml2-utils ...
Removing libkrb5-dev ...
Removing libcurl3-gnutls ...
Purging configuration files for libcurl3-gnutls ...
Removing pkg-config ...
Removing xml-core ...
Purging configuration files for xml-core ...
dpkg - warning: while removing xml-core, directory `/etc/sgml' not empty so not removed.
Removing libtasn1-3-dev ...
Removing ca-certificates ...
Removing hash symlinks in /etc/ssl/certs ...done.
Purging configuration files for ca-certificates ...
Removing libplrpc-perl ...
Removing zlib1g-dev ...
Removing python2.5 ...
Purging configuration files for python2.5 ...
dpkg - warning: while removing python2.5, directory `/usr/share/applications' not empty so not removed.
Removing openssl ...
Purging configuration files for openssl ...
dpkg - warning: while removing openssl, directory `/etc/ssl/private' not empty so not removed.
dpkg - warning: while removing openssl, directory `/etc/ssl/certs' not empty so not removed.
dpkg - warning: while removing openssl, directory `/etc/ssl' not empty so not removed.
Removing libgcrypt11-dev ...
Removing libnet-daemon-perl ...
Removing libkadm55 ...
Purging configuration files for libkadm55 ...
Removing libaprutil1 ...
Purging configuration files for libaprutil1 ...
Removing libidn11 ...
Purging configuration files for libidn11 ...
Removing sgml-base ...
Purging configuration files for sgml-base ...
Removing libgnutls26 ...
Purging configuration files for libgnutls26 ...
Removing libxslt1.1 ...
Purging configuration files for libxslt1.1 ...
Removing libexpat1 ...
Purging configuration files for libexpat1 ...
Removing libglib2.0-0 ...
Purging configuration files for libglib2.0-0 ...
Removing mime-support ...
Purging configuration files for mime-support ...
Removing comerr-dev ...
Removing libgpg-error-dev ...
Removing libapr1 ...
Purging configuration files for libapr1 ...
Removing libxml2 ...
Purging configuration files for libxml2 ...
Removing libreadline5 ...
Purging configuration files for libreadline5 ...
Removing libsqlite3-0 ...
Purging configuration files for libsqlite3-0 ...
Removing libncursesw5 ...
Purging configuration files for libncursesw5 ...
Removing readline-common ...
Purging configuration files for readline-common ...
Removing libmysqlclient15off ...
Purging configuration files for libmysqlclient15off ...
Removing libpq5 ...
Purging configuration files for libpq5 ...
Removing libldap-2.4-2 ...
Purging configuration files for libldap-2.4-2 ...
Removing mysql-common ...
Purging configuration files for mysql-common ...
Removing libkrb53 ...
Purging configuration files for libkrb53 ...
Removing libgnutls13 ...
Purging configuration files for libgnutls13 ...
Removing libopencdk10 ...
Purging configuration files for libopencdk10 ...
Removing liblzo2-2 ...
Purging configuration files for liblzo2-2 ...
Removing libgcrypt11 ...
Purging configuration files for libgcrypt11 ...
Removing libkeyutils1 ...
Purging configuration files for libkeyutils1 ...
Removing libtasn1-3 ...
Purging configuration files for libtasn1-3 ...
Removing libgpg-error0 ...
Purging configuration files for libgpg-error0 ...
Removing libsasl2-2 ...
Purging configuration files for libsasl2-2 ...
Removing libsasl2-modules ...
Removing libssl0.9.8 ...
Purging configuration files for libssl0.9.8 ...
******************************************************************************
Finished at 20080705-1114
Build needed 00:05:58, 40440k disk space
More information about the ubuntu-autotest
mailing list