Last active
November 26, 2019 13:40
-
-
Save dscho/241280f1f56d593d060a20f7906d345c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initialized empty Git repository in /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/.git/ | |
expecting success of 6500.1 'setup': | |
# do not let the amount of physical memory affects gc | |
# behavior, make sure we always pack everything to one pack by | |
# default | |
git config gc.bigPackThreshold 2g | |
+ git config gc.bigPackThreshold 2g | |
ok 1 - setup | |
expecting success of 6500.2 'gc empty repository': | |
git gc | |
+ git gc | |
Nothing new to pack. | |
ok 2 - gc empty repository | |
expecting success of 6500.3 'gc does not leave behind pid file': | |
git gc && | |
test_path_is_missing .git/gc.pid | |
+ git gc | |
Nothing new to pack. | |
+ test_path_is_missing .git/gc.pid | |
+ test -e .git/gc.pid | |
ok 3 - gc does not leave behind pid file | |
expecting success of 6500.4 'gc --gobbledegook': | |
test_expect_code 129 git gc --nonsense 2>err && | |
test_i18ngrep "[Uu]sage: git gc" err | |
+ test_expect_code 129 git gc --nonsense | |
+ want_code=129 | |
+ shift | |
+ git gc --nonsense | |
+ exit_code=129 | |
+ test 129 = 129 | |
+ return 0 | |
+ test_i18ngrep [Uu]sage: git gc err | |
+ eval last_arg=${2} | |
+ last_arg=err | |
+ test -f err | |
+ test 2 -lt 2 | |
+ test x! = x[Uu]sage: git gc | |
+ test_have_prereq !C_LOCALE_OUTPUT | |
+ save_IFS= | |
+ IFS=, | |
+ set -- !C_LOCALE_OUTPUT | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq=t | |
+ prerequisite=C_LOCALE_OUTPUT | |
+ eval script=$test_prereq_lazily_C_LOCALE_OUTPUT | |
+ script= | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
+ test_run_lazy_prereq_ C_LOCALE_OUTPUT | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
+ script= | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ say checking prerequisite: C_LOCALE_OUTPUT | |
+ say_color info checking prerequisite: C_LOCALE_OUTPUT | |
+ test -z info | |
+ shift | |
+ printf %s\n checking prerequisite: C_LOCALE_OUTPUT | |
checking prerequisite: C_LOCALE_OUTPUT | |
+ say | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ say_color info | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ test -z info | |
+ shift | |
+ printf %s\n | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ test_eval_ | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ test_eval_inner_ | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ eval | |
want_trace && set -x | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
! git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
) | |
+ want_trace | |
+ test t = t | |
+ test = t | |
+ test t = t | |
+ set -x | |
+ mkdir -p /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/prereq-test-dir | |
+ cd /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/prereq-test-dir | |
+ git env--helper --type=bool --default=0 --exit-code GIT_TEST_GETTEXT_POISON | |
prerequisite C_LOCALE_OUTPUT ok | |
usage: git gc [<options>] | |
ok 4 - gc --gobbledegook | |
expecting success of 6500.5 'gc -h with invalid configuration': | |
mkdir broken && | |
( | |
cd broken && | |
git init && | |
echo "[gc] pruneexpire = CORRUPT" >>.git/config && | |
test_expect_code 129 git gc -h >usage 2>&1 | |
) && | |
test_i18ngrep "[Uu]sage" broken/usage | |
+ mkdir broken | |
+ cd broken | |
+ git init | |
Initialized empty Git repository in /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/broken/.git/ | |
+ echo [gc] pruneexpire = CORRUPT | |
+ test_expect_code 129 git gc -h | |
+ want_code=129 | |
+ shift | |
+ git gc -h | |
+ exit_code=129 | |
+ test 129 = 129 | |
+ return 0 | |
+ test_i18ngrep [Uu]sage broken/usage | |
+ eval last_arg=${2} | |
+ last_arg=broken/usage | |
+ test -f broken/usage | |
+ test 2 -lt 2 | |
+ test x! = x[Uu]sage | |
+ test_have_prereq !C_LOCALE_OUTPUT | |
+ save_IFS= | |
+ IFS=, | |
+ set -- !C_LOCALE_OUTPUT | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq=t | |
+ prerequisite=C_LOCALE_OUTPUT | |
+ total_prereq=1 | |
+ satisfied_this_prereq=t | |
+ prerequisite=!C_LOCALE_OUTPUT | |
+ test -z | |
+ missing_prereq=!C_LOCALE_OUTPUT | |
+ test 1 = 0 | |
+ test x! = x[Uu]sage | |
+ grep [Uu]sage broken/usage | |
usage: git gc [<options>] | |
+ return 0 | |
ok 5 - gc -h with invalid configuration | |
expecting success of 6500.6 'gc is not aborted due to a stale symref': | |
git init remote && | |
( | |
cd remote && | |
test_commit initial && | |
git clone . ../client && | |
git branch -m develop && | |
cd ../client && | |
git fetch --prune && | |
git gc | |
) | |
+ git init remote | |
Initialized empty Git repository in /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/remote/.git/ | |
+ cd remote | |
+ test_commit initial | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=initial.t | |
+ echo initial | |
+ git add initial.t | |
+ test -z | |
+ test_tick | |
+ test -z | |
+ test_tick=1112911993 | |
+ GIT_COMMITTER_DATE=1112911993 -0700 | |
+ GIT_AUTHOR_DATE=1112911993 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m initial | |
[master (root-commit) 24b24cf] initial | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 initial.t | |
+ git tag initial | |
+ git clone . ../client | |
Cloning into '../client'... | |
done. | |
+ git branch -m develop | |
+ cd ../client | |
+ git fetch --prune | |
From /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/remote/. | |
- [deleted] (none) -> origin/master | |
(refs/remotes/origin/HEAD has become dangling) | |
* [new branch] develop -> origin/develop | |
+ git gc | |
Computing commit graph generation numbers: 100% (1/1) | |
Computing commit graph generation numbers: 100% (1/1), done. | |
ok 6 - gc is not aborted due to a stale symref | |
expecting success of 6500.7 'gc --keep-largest-pack': | |
test_create_repo keep-pack && | |
( | |
cd keep-pack && | |
test_commit one && | |
test_commit two && | |
test_commit three && | |
git gc && | |
( cd .git/objects/pack && ls *.pack ) >pack-list && | |
test_line_count = 1 pack-list && | |
BASE_PACK=.git/objects/pack/pack-*.pack && | |
test_commit four && | |
git repack -d && | |
test_commit five && | |
git repack -d && | |
( cd .git/objects/pack && ls *.pack ) >pack-list && | |
test_line_count = 3 pack-list && | |
git gc --keep-largest-pack && | |
( cd .git/objects/pack && ls *.pack ) >pack-list && | |
test_line_count = 2 pack-list && | |
awk "/^P /{print \$2}" <.git/objects/info/packs >pack-info && | |
test_line_count = 2 pack-info && | |
test_path_is_file $BASE_PACK && | |
git fsck | |
) | |
+ test_create_repo keep-pack | |
+ test 1 = 1 | |
+ repo=keep-pack | |
+ mkdir -p keep-pack | |
+ cd keep-pack | |
+ /home/virtualbox/git/git-for-windows/t/../git init --template=/home/virtualbox/git/git-for-windows/t/../templates/blt/ | |
Initialized empty Git repository in /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/keep-pack/.git/ | |
+ mv .git/hooks .git/hooks-disabled | |
+ cd keep-pack | |
+ test_commit one | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=one.t | |
+ echo one | |
+ git add one.t | |
+ test -z | |
+ test_tick | |
+ test -z | |
+ test_tick=1112911993 | |
+ GIT_COMMITTER_DATE=1112911993 -0700 | |
+ GIT_AUTHOR_DATE=1112911993 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m one | |
[master (root-commit) d79ce16] one | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 one.t | |
+ git tag one | |
+ test_commit two | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=two.t | |
+ echo two | |
+ git add two.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912053 | |
+ GIT_COMMITTER_DATE=1112912053 -0700 | |
+ GIT_AUTHOR_DATE=1112912053 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m two | |
[master 139b20d] two | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 two.t | |
+ git tag two | |
+ test_commit three | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=three.t | |
+ echo three | |
+ git add three.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912113 | |
+ GIT_COMMITTER_DATE=1112912113 -0700 | |
+ GIT_AUTHOR_DATE=1112912113 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m three | |
[master 7c7cd71] three | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 three.t | |
+ git tag three | |
+ git gc | |
Computing commit graph generation numbers: 33% (1/3) | |
Computing commit graph generation numbers: 66% (2/3) | |
Computing commit graph generation numbers: 100% (3/3) | |
Computing commit graph generation numbers: 100% (3/3), done. | |
+ cd .git/objects/pack | |
+ ls pack-a4b37b9b5458e8116b1c1840185b39fb5e6b8726.pack | |
+ test_line_count = 1 pack-list | |
+ test 3 != 3 | |
+ wc -l | |
+ test 1 = 1 | |
+ BASE_PACK=.git/objects/pack/pack-*.pack | |
+ test_commit four | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=four.t | |
+ echo four | |
+ git add four.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912173 | |
+ GIT_COMMITTER_DATE=1112912173 -0700 | |
+ GIT_AUTHOR_DATE=1112912173 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m four | |
[master fd8d77e] four | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 four.t | |
+ git tag four | |
+ git repack -d | |
+ test_commit five | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=five.t | |
+ echo five | |
+ git add five.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912233 | |
+ GIT_COMMITTER_DATE=1112912233 -0700 | |
+ GIT_AUTHOR_DATE=1112912233 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m five | |
[master a383792] five | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 five.t | |
+ git tag five | |
+ git repack -d | |
+ cd .git/objects/pack | |
+ ls pack-057d7f493a7c26d58090f4777ff66d4c226c4408.pack pack-54feec766fc7d2d204b03879d96f4595d7e48c37.pack pack-a4b37b9b5458e8116b1c1840185b39fb5e6b8726.pack | |
+ test_line_count = 3 pack-list | |
+ test 3 != 3 | |
+ wc -l | |
+ test 3 = 3 | |
+ git gc --keep-largest-pack | |
Computing commit graph generation numbers: 20% (1/5) | |
Computing commit graph generation numbers: 40% (2/5) | |
Computing commit graph generation numbers: 60% (3/5) | |
Computing commit graph generation numbers: 80% (4/5) | |
Computing commit graph generation numbers: 100% (5/5) | |
Computing commit graph generation numbers: 100% (5/5), done. | |
+ cd .git/objects/pack | |
+ ls pack-390dbbb8e27c014b080c08dfc482d4982d4c6644.pack pack-a4b37b9b5458e8116b1c1840185b39fb5e6b8726.pack | |
+ test_line_count = 2 pack-list | |
+ test 3 != 3 | |
+ wc -l | |
+ test 2 = 2 | |
+ awk /^P /{print $2} | |
+ test_line_count = 2 pack-info | |
+ test 3 != 3 | |
+ wc -l | |
+ test 2 = 2 | |
+ test_path_is_file .git/objects/pack/pack-390dbbb8e27c014b080c08dfc482d4982d4c6644.pack .git/objects/pack/pack-a4b37b9b5458e8116b1c1840185b39fb5e6b8726.pack | |
+ test -f .git/objects/pack/pack-390dbbb8e27c014b080c08dfc482d4982d4c6644.pack | |
+ git fsck | |
ok 7 - gc --keep-largest-pack | |
expecting success of 6500.8 'auto gc with too many loose objects does not attempt to create bitmaps': | |
test_config gc.auto 3 && | |
test_config gc.autodetach false && | |
test_config pack.writebitmaps true && | |
# We need to create two object whose sha1s start with 17 | |
# since this is what git gc counts. As it happens, these | |
# two blobs will do so. | |
test_commit 263 && | |
test_commit 410 && | |
# Our first gc will create a pack; our second will create a second pack | |
git gc --auto && | |
ls .git/objects/pack | sort >existing_packs && | |
test_commit 523 && | |
test_commit 790 && | |
git gc --auto 2>err && | |
test_i18ngrep ! "^warning:" err && | |
ls .git/objects/pack/ | sort >post_packs && | |
comm -1 -3 existing_packs post_packs >new && | |
comm -2 -3 existing_packs post_packs >del && | |
test_line_count = 0 del && # No packs are deleted | |
test_line_count = 2 new # There is one new pack and its .idx | |
+ test_config gc.auto 3 | |
+ config_dir= | |
+ test gc.auto = -C | |
+ test_when_finished test_unconfig 'gc.auto' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.auto' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.auto 3 | |
+ test_config gc.autodetach false | |
+ config_dir= | |
+ test gc.autodetach = -C | |
+ test_when_finished test_unconfig 'gc.autodetach' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.autodetach' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.auto' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.autodetach false | |
+ test_config pack.writebitmaps true | |
+ config_dir= | |
+ test pack.writebitmaps = -C | |
+ test_when_finished test_unconfig 'pack.writebitmaps' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'pack.writebitmaps' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autodetach' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.auto' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config pack.writebitmaps true | |
+ test_commit 263 | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=263.t | |
+ echo 263 | |
+ git add 263.t | |
+ test -z | |
+ test_tick | |
+ test -z | |
+ test_tick=1112911993 | |
+ GIT_COMMITTER_DATE=1112911993 -0700 | |
+ GIT_AUTHOR_DATE=1112911993 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m 263 | |
[master (root-commit) 1808a60] 263 | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 263.t | |
+ git tag 263 | |
+ test_commit 410 | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=410.t | |
+ echo 410 | |
+ git add 410.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912053 | |
+ GIT_COMMITTER_DATE=1112912053 -0700 | |
+ GIT_AUTHOR_DATE=1112912053 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m 410 | |
Auto packing the repository for optimum performance. | |
See "git help gc" for manual housekeeping. | |
Computing commit graph generation numbers: 50% (1/2) | |
Computing commit graph generation numbers: 100% (2/2) | |
Computing commit graph generation numbers: 100% (2/2), done. | |
[master 9a14344] 410 | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 410.t | |
+ git tag 410 | |
+ git gc --auto | |
+ ls .git/objects/pack | |
+ sort | |
+ test_commit 523 | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=523.t | |
+ echo 523 | |
+ git add 523.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912113 | |
+ GIT_COMMITTER_DATE=1112912113 -0700 | |
+ GIT_AUTHOR_DATE=1112912113 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m 523 | |
[master 54e21e7] 523 | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 523.t | |
+ git tag 523 | |
+ test_commit 790 | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=790.t | |
+ echo 790 | |
+ git add 790.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912173 | |
+ GIT_COMMITTER_DATE=1112912173 -0700 | |
+ GIT_AUTHOR_DATE=1112912173 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m 790 | |
Auto packing the repository for optimum performance. | |
See "git help gc" for manual housekeeping. | |
Computing commit graph generation numbers: 25% (1/4) | |
Computing commit graph generation numbers: 50% (2/4) | |
Computing commit graph generation numbers: 75% (3/4) | |
Computing commit graph generation numbers: 100% (4/4) | |
Computing commit graph generation numbers: 100% (4/4), done. | |
[master 60dd8ad] 790 | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 790.t | |
+ git tag 790 | |
+ git gc --auto | |
+ test_i18ngrep ! ^warning: err | |
+ eval last_arg=${3} | |
+ last_arg=err | |
+ test -f err | |
+ test 3 -lt 2 | |
+ test x! = x! | |
+ test 3 -lt 3 | |
+ test_have_prereq !C_LOCALE_OUTPUT | |
+ save_IFS= | |
+ IFS=, | |
+ set -- !C_LOCALE_OUTPUT | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq=t | |
+ prerequisite=C_LOCALE_OUTPUT | |
+ total_prereq=1 | |
+ satisfied_this_prereq=t | |
+ prerequisite=!C_LOCALE_OUTPUT | |
+ test -z | |
+ missing_prereq=!C_LOCALE_OUTPUT | |
+ test 1 = 0 | |
+ test x! = x! | |
+ shift | |
+ grep ^warning: err | |
+ return 0 | |
+ ls .git/objects/pack/ | |
+ sort | |
+ comm -1 -3 existing_packs post_packs | |
+ comm -2 -3 existing_packs post_packs | |
+ test_line_count = 0 del | |
+ test 3 != 3 | |
+ wc -l | |
+ test 0 = 0 | |
+ test_line_count = 2 new | |
+ test 3 != 3 | |
+ wc -l | |
+ test 2 = 2 | |
+ test_unconfig pack.writebitmaps | |
+ config_dir= | |
+ test pack.writebitmaps = -C | |
+ git config --unset-all pack.writebitmaps | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.autodetach | |
+ config_dir= | |
+ test gc.autodetach = -C | |
+ git config --unset-all gc.autodetach | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.auto | |
+ config_dir= | |
+ test gc.auto = -C | |
+ git config --unset-all gc.auto | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ : | |
ok 8 - auto gc with too many loose objects does not attempt to create bitmaps | |
expecting success of 6500.9 'gc --no-quiet': | |
git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr && | |
test_must_be_empty stdout && | |
test_line_count = 1 stderr && | |
test_i18ngrep "Computing commit graph generation numbers" stderr | |
+ git -c gc.writeCommitGraph=true gc --no-quiet | |
+ test_must_be_empty stdout | |
+ test_path_is_file stdout | |
+ test -f stdout | |
+ test -s stdout | |
+ test_line_count = 1 stderr | |
+ test 3 != 3 | |
+ wc -l | |
+ test 1 = 1 | |
+ test_i18ngrep Computing commit graph generation numbers stderr | |
+ eval last_arg=${2} | |
+ last_arg=stderr | |
+ test -f stderr | |
+ test 2 -lt 2 | |
+ test x! = xComputing commit graph generation numbers | |
+ test_have_prereq !C_LOCALE_OUTPUT | |
+ save_IFS= | |
+ IFS=, | |
+ set -- !C_LOCALE_OUTPUT | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq=t | |
+ prerequisite=C_LOCALE_OUTPUT | |
+ total_prereq=1 | |
+ satisfied_this_prereq=t | |
+ prerequisite=!C_LOCALE_OUTPUT | |
+ test -z | |
+ missing_prereq=!C_LOCALE_OUTPUT | |
+ test 1 = 0 | |
+ test x! = xComputing commit graph generation numbers | |
+ grep Computing commit graph generation numbers stderr | |
Computing commit graph generation numbers: 25% (1/4) | |
Computing commit graph generation numbers: 50% (2/4) | |
Computing commit graph generation numbers: 75% (3/4) | |
Computing commit graph generation numbers: 100% (4/4) | |
Computing commit graph generation numbers: 100% (4/4), done. | |
+ return 0 | |
ok 9 - gc --no-quiet | |
checking prerequisite: TTY | |
mkdir -p "$TRASH_DIRECTORY/prereq-test-dir" && | |
( | |
cd "$TRASH_DIRECTORY/prereq-test-dir" && | |
test_have_prereq PERL && | |
# Reading from the pty master seems to get stuck _sometimes_ | |
# on Mac OS X 10.5.0, using Perl 5.10.0 or 5.8.9. | |
# | |
# Reproduction recipe: run | |
# | |
# i=0 | |
# while ./test-terminal.perl echo hi $i | |
# do | |
# : $((i = $i + 1)) | |
# done | |
# | |
# After 2000 iterations or so it hangs. | |
# https://rt.cpan.org/Ticket/Display.html?id=65692 | |
# | |
test "$(uname -s)" != Darwin && | |
perl "$TEST_DIRECTORY"/test-terminal.perl \ | |
sh -c "test -t 1 && test -t 2" | |
) | |
+ mkdir -p /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/prereq-test-dir | |
+ cd /home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/prereq-test-dir | |
+ test_have_prereq PERL | |
+ save_IFS= | |
+ IFS=, | |
+ set -- PERL | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq= | |
+ total_prereq=1 | |
+ satisfied_this_prereq=t | |
+ ok_prereq=1 | |
+ test 1 = 1 | |
+ uname -s | |
+ test Linux != Darwin | |
+ perl /home/virtualbox/git/git-for-windows/t/test-terminal.perl sh -c test -t 1 && test -t 2 | |
+ command /usr/bin/perl /home/virtualbox/git/git-for-windows/t/test-terminal.perl sh -c test -t 1 && test -t 2 | |
Can't locate IO/Pty.pm in @INC (you may need to install the IO::Pty module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/virtualbox/git/git-for-windows/t/test-terminal.perl line 5. | |
BEGIN failed--compilation aborted at /home/virtualbox/git/git-for-windows/t/test-terminal.perl line 5. | |
error: last command exited with $?=2 | |
prerequisite TTY not satisfied | |
skipping test: with TTY: gc --no-quiet | |
test_terminal git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr && | |
test_must_be_empty stdout && | |
test_i18ngrep "Enumerating objects" stderr && | |
test_i18ngrep "Computing commit graph generation numbers" stderr | |
ok 10 # skip with TTY: gc --no-quiet (missing TTY) | |
expecting success of 6500.11 'gc --quiet': | |
git -c gc.writeCommitGraph=true gc --quiet >stdout 2>stderr && | |
test_must_be_empty stdout && | |
test_must_be_empty stderr | |
+ git -c gc.writeCommitGraph=true gc --quiet | |
+ test_must_be_empty stdout | |
+ test_path_is_file stdout | |
+ test -f stdout | |
+ test -s stdout | |
+ test_must_be_empty stderr | |
+ test_path_is_file stderr | |
+ test -f stderr | |
+ test -s stderr | |
ok 11 - gc --quiet | |
expecting success of 6500.12 'gc.reflogExpire{Unreachable,}=never skips "expire" via "gc"': | |
test_config gc.reflogExpire never && | |
test_config gc.reflogExpireUnreachable never && | |
GIT_TRACE=$(pwd)/trace.out git gc && | |
# Check that git-pack-refs is run as a sanity check (done via | |
# gc_before_repack()) but that git-expire is not. | |
grep -E "^trace: (built-in|exec|run_command): git pack-refs --" trace.out && | |
! grep -E "^trace: (built-in|exec|run_command): git reflog expire --" trace.out | |
+ test_config gc.reflogExpire never | |
+ config_dir= | |
+ test gc.reflogExpire = -C | |
+ test_when_finished test_unconfig 'gc.reflogExpire' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.reflogExpire' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.reflogExpire never | |
+ test_config gc.reflogExpireUnreachable never | |
+ config_dir= | |
+ test gc.reflogExpireUnreachable = -C | |
+ test_when_finished test_unconfig 'gc.reflogExpireUnreachable' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.reflogExpireUnreachable' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.reflogExpire' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.reflogExpireUnreachable never | |
+ pwd | |
+ GIT_TRACE=/home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/trace.out git gc | |
Computing commit graph generation numbers: 25% (1/4) | |
Computing commit graph generation numbers: 50% (2/4) | |
Computing commit graph generation numbers: 75% (3/4) | |
Computing commit graph generation numbers: 100% (4/4) | |
Computing commit graph generation numbers: 100% (4/4), done. | |
+ grep -E ^trace: (built-in|exec|run_command): git pack-refs -- trace.out | |
trace: run_command: git pack-refs --all --prune | |
trace: built-in: git pack-refs --all --prune | |
+ grep -E ^trace: (built-in|exec|run_command): git reflog expire -- trace.out | |
+ test_unconfig gc.reflogExpireUnreachable | |
+ config_dir= | |
+ test gc.reflogExpireUnreachable = -C | |
+ git config --unset-all gc.reflogExpireUnreachable | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.reflogExpire | |
+ config_dir= | |
+ test gc.reflogExpire = -C | |
+ git config --unset-all gc.reflogExpire | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ : | |
ok 12 - gc.reflogExpire{Unreachable,}=never skips "expire" via "gc" | |
expecting success of 6500.13 'one of gc.reflogExpire{Unreachable,}=never does not skip "expire" via "gc"': | |
>trace.out && | |
test_config gc.reflogExpire never && | |
GIT_TRACE=$(pwd)/trace.out git gc && | |
grep -E "^trace: (built-in|exec|run_command): git reflog expire --" trace.out | |
+ | |
+ test_config gc.reflogExpire never | |
+ config_dir= | |
+ test gc.reflogExpire = -C | |
+ test_when_finished test_unconfig 'gc.reflogExpire' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.reflogExpire' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.reflogExpire never | |
+ pwd | |
+ GIT_TRACE=/home/virtualbox/git/git-for-windows/t/trash directory.t6500-gc/trace.out git gc | |
Computing commit graph generation numbers: 25% (1/4) | |
Computing commit graph generation numbers: 50% (2/4) | |
Computing commit graph generation numbers: 75% (3/4) | |
Computing commit graph generation numbers: 100% (4/4) | |
Computing commit graph generation numbers: 100% (4/4), done. | |
+ grep -E ^trace: (built-in|exec|run_command): git reflog expire -- trace.out | |
trace: run_command: git reflog expire --all | |
trace: built-in: git reflog expire --all | |
+ test_unconfig gc.reflogExpire | |
+ config_dir= | |
+ test gc.reflogExpire = -C | |
+ git config --unset-all gc.reflogExpire | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ : | |
ok 13 - one of gc.reflogExpire{Unreachable,}=never does not skip "expire" via "gc" | |
expecting success of 6500.14 'background auto gc does not run if gc.log is present and recent but does if it is old': | |
test_commit foo && | |
test_commit bar && | |
git repack && | |
test_config gc.autopacklimit 1 && | |
test_config gc.autodetach true && | |
echo fleem >.git/gc.log && | |
git gc --auto 2>err && | |
test_i18ngrep "^warning:" err && | |
test_config gc.logexpiry 5.days && | |
test-tool chmtime =-345600 .git/gc.log && | |
git gc --auto && | |
test_config gc.logexpiry 2.days && | |
run_and_wait_for_auto_gc && | |
ls .git/objects/pack/pack-*.pack >packs && | |
test_line_count = 1 packs | |
+ test_commit foo | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=foo.t | |
+ echo foo | |
+ git add foo.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912233 | |
+ GIT_COMMITTER_DATE=1112912233 -0700 | |
+ GIT_AUTHOR_DATE=1112912233 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m foo | |
[master b16b551] foo | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 foo.t | |
+ git tag foo | |
+ test_commit bar | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=bar.t | |
+ echo bar | |
+ git add bar.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912293 | |
+ GIT_COMMITTER_DATE=1112912293 -0700 | |
+ GIT_AUTHOR_DATE=1112912293 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m bar | |
[master fc616a4] bar | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 bar.t | |
+ git tag bar | |
+ git repack | |
+ test_config gc.autopacklimit 1 | |
+ config_dir= | |
+ test gc.autopacklimit = -C | |
+ test_when_finished test_unconfig 'gc.autopacklimit' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.autopacklimit' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.autopacklimit 1 | |
+ test_config gc.autodetach true | |
+ config_dir= | |
+ test gc.autodetach = -C | |
+ test_when_finished test_unconfig 'gc.autodetach' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.autodetach' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autopacklimit' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.autodetach true | |
+ echo fleem | |
+ git gc --auto | |
+ test_i18ngrep ^warning: err | |
+ eval last_arg=${2} | |
+ last_arg=err | |
+ test -f err | |
+ test 2 -lt 2 | |
+ test x! = x^warning: | |
+ test_have_prereq !C_LOCALE_OUTPUT | |
+ save_IFS= | |
+ IFS=, | |
+ set -- !C_LOCALE_OUTPUT | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq=t | |
+ prerequisite=C_LOCALE_OUTPUT | |
+ total_prereq=1 | |
+ satisfied_this_prereq=t | |
+ prerequisite=!C_LOCALE_OUTPUT | |
+ test -z | |
+ missing_prereq=!C_LOCALE_OUTPUT | |
+ test 1 = 0 | |
+ test x! = x^warning: | |
+ grep ^warning: err | |
warning: The last gc run reported the following. Please correct the root cause | |
+ return 0 | |
+ test_config gc.logexpiry 5.days | |
+ config_dir= | |
+ test gc.logexpiry = -C | |
+ test_when_finished test_unconfig 'gc.logexpiry' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.logexpiry' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autodetach' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autopacklimit' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.logexpiry 5.days | |
+ test-tool chmtime =-345600 .git/gc.log | |
+ git gc --auto | |
Auto packing the repository in background for optimum performance. | |
See "git help gc" for manual housekeeping. | |
warning: The last gc run reported the following. Please correct the root cause | |
and remove .git/gc.log. | |
Automatic cleanup will not be performed until the file is removed. | |
fleem | |
+ test_config gc.logexpiry 2.days | |
+ config_dir= | |
+ test gc.logexpiry = -C | |
+ test_when_finished test_unconfig 'gc.logexpiry' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.logexpiry' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.logexpiry' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autodetach' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autopacklimit' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.logexpiry 2.days | |
+ run_and_wait_for_auto_gc | |
+ git gc --auto | |
Auto packing the repository in background for optimum performance. | |
See "git help gc" for manual housekeeping. | |
+ doesnt_matter= | |
+ ls .git/objects/pack/pack-c63ba51f172634e85cfa3f8d62164a139b4ef8d7.pack | |
+ test_line_count = 1 packs | |
+ test 3 != 3 | |
+ wc -l | |
+ test 1 = 1 | |
+ test_unconfig gc.logexpiry | |
+ config_dir= | |
+ test gc.logexpiry = -C | |
+ git config --unset-all gc.logexpiry | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.logexpiry | |
+ config_dir= | |
+ test gc.logexpiry = -C | |
+ git config --unset-all gc.logexpiry | |
+ config_status=5 | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.autodetach | |
+ config_dir= | |
+ test gc.autodetach = -C | |
+ git config --unset-all gc.autodetach | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.autopacklimit | |
+ config_dir= | |
+ test gc.autopacklimit = -C | |
+ git config --unset-all gc.autopacklimit | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ : | |
ok 14 - background auto gc does not run if gc.log is present and recent but does if it is old | |
expecting success of 6500.15 'background auto gc respects lock for all operations': | |
# make sure we run a background auto-gc | |
test_commit make-pack && | |
git repack && | |
test_config gc.autopacklimit 1 && | |
test_config gc.autodetach true && | |
# create a ref whose loose presence we can use to detect a pack-refs run | |
git update-ref refs/heads/should-be-loose HEAD && | |
test_path_is_file .git/refs/heads/should-be-loose && | |
# now fake a concurrent gc that holds the lock; we can use our | |
# shell pid so that it looks valid. | |
hostname=$(hostname || echo unknown) && | |
shell_pid=$$ && | |
if test_have_prereq MINGW && test -f /proc/$shell_pid/winpid | |
then | |
# In Git for Windows, Bash (actually, the MSYS2 runtime) has a | |
# different idea of PIDs than git.exe (actually Windows). Use | |
# the Windows PID in this case. | |
shell_pid=$(cat /proc/$shell_pid/winpid) | |
fi && | |
printf "%d %s" "$shell_pid" "$hostname" >.git/gc.pid && | |
# our gc should exit zero without doing anything | |
run_and_wait_for_auto_gc && | |
test_path_is_file .git/refs/heads/should-be-loose | |
+ test_commit make-pack | |
+ notick= | |
+ signoff= | |
+ indir= | |
+ test 1 != 0 | |
+ break | |
+ indir= | |
+ file=make-pack.t | |
+ echo make-pack | |
+ git add make-pack.t | |
+ test -z | |
+ test_tick | |
+ test -z set | |
+ test_tick=1112912353 | |
+ GIT_COMMITTER_DATE=1112912353 -0700 | |
+ GIT_AUTHOR_DATE=1112912353 -0700 | |
+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE | |
+ git commit -m make-pack | |
[master 28ecdda] make-pack | |
Author: A U Thor <author@example.com> | |
1 file changed, 1 insertion(+) | |
create mode 100644 make-pack.t | |
+ git tag make-pack | |
+ git repack | |
+ test_config gc.autopacklimit 1 | |
+ config_dir= | |
+ test gc.autopacklimit = -C | |
+ test_when_finished test_unconfig 'gc.autopacklimit' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.autopacklimit' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.autopacklimit 1 | |
+ test_config gc.autodetach true | |
+ config_dir= | |
+ test gc.autodetach = -C | |
+ test_when_finished test_unconfig 'gc.autodetach' | |
+ test 0 = 0 | |
+ test_cleanup={ test_unconfig 'gc.autodetach' | |
} && (exit "$eval_ret"); eval_ret=$?; { test_unconfig 'gc.autopacklimit' | |
} && (exit "$eval_ret"); eval_ret=$?; : | |
+ git config gc.autodetach true | |
+ git update-ref refs/heads/should-be-loose HEAD | |
+ test_path_is_file .git/refs/heads/should-be-loose | |
+ test -f .git/refs/heads/should-be-loose | |
+ hostname | |
+ hostname=gitforwindows | |
+ shell_pid=22441 | |
+ test_have_prereq MINGW | |
+ save_IFS= | |
+ IFS=, | |
+ set -- MINGW | |
+ IFS= | |
+ total_prereq=0 | |
+ ok_prereq=0 | |
+ missing_prereq= | |
+ negative_prereq= | |
+ total_prereq=1 | |
+ satisfied_this_prereq= | |
+ prerequisite=MINGW | |
+ test -z | |
+ missing_prereq=MINGW | |
+ test 1 = 0 | |
+ printf %d %s 22441 gitforwindows | |
+ run_and_wait_for_auto_gc | |
+ git gc --auto | |
Auto packing the repository in background for optimum performance. | |
See "git help gc" for manual housekeeping. | |
+ doesnt_matter= | |
+ test_path_is_file .git/refs/heads/should-be-loose | |
+ test -f .git/refs/heads/should-be-loose | |
+ test_unconfig gc.autodetach | |
+ config_dir= | |
+ test gc.autodetach = -C | |
+ git config --unset-all gc.autodetach | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ test_unconfig gc.autopacklimit | |
+ config_dir= | |
+ test gc.autopacklimit = -C | |
+ git config --unset-all gc.autopacklimit | |
+ config_status=0 | |
+ return 0 | |
+ exit 0 | |
+ eval_ret=0 | |
+ : | |
ok 15 - background auto gc respects lock for all operations | |
# passed all 15 test(s) | |
1..15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment