Revision 2f3b28f27234a0130583131a6785c44e3dd1cac4 authored by Johannes Schindelin on 09 March 2023, 22:08:47 UTC, committed by Johannes Schindelin on 17 April 2023, 19:15:37 UTC
The `maint-2.30` branch accumulated quite a few fixes over the past two
years. Most of those fixes were originally based on newer versions, and
while the patches cherry-picked cleanly, we weren't diligent enough to
pay attention to the CI builds and the GETTEXT_POISON job regressed.
This topic branch fixes that.

* js/gettext-poison-fixes
  t0033: GETTEXT_POISON fix
  t0003: GETTEXT_POISON fix, part 1
  t0003: GETTEXT_POISON fix, conclusion
  t5619: GETTEXT_POISON fix
  t5604: GETTEXT_POISON fix, part 1
  t5604: GETTEXT_POISON fix, conclusion
2 parent s 4989c35 + 0c8d22a
Raw File
t6011-rev-list-with-bad-commit.sh
#!/bin/sh

test_description='git rev-list should notice bad commits'

. ./test-lib.sh

# Note:
# - compression level is set to zero to make "corruptions" easier to perform
# - reflog is disabled to avoid extra references which would twart the test

test_expect_success 'setup' \
   '
   git init &&
   git config core.compression 0 &&
   git config core.logallrefupdates false &&
   echo "foo" > foo &&
   git add foo &&
   git commit -m "first commit" &&
   echo "bar" > bar &&
   git add bar &&
   git commit -m "second commit" &&
   echo "baz" > baz &&
   git add baz &&
   git commit -m "third commit" &&
   echo "foo again" >> foo &&
   git add foo &&
   git commit -m "fourth commit" &&
   git repack -a -f -d
   '

test_expect_success 'verify number of revisions' \
   '
   revs=$(git rev-list --all | wc -l) &&
   test $revs -eq 4 &&
   first_commit=$(git rev-parse HEAD~3)
   '

test_expect_success 'corrupt second commit object' \
   '
   perl -i.bak -pe "s/second commit/socond commit/" .git/objects/pack/*.pack &&
   test_must_fail git fsck --full
   '

test_expect_success 'rev-list should fail' '
	test_must_fail env GIT_TEST_COMMIT_GRAPH=0 git -c core.commitGraph=false rev-list --all > /dev/null
'

test_expect_success 'git repack _MUST_ fail' \
   '
   test_must_fail git repack -a -f -d
   '

test_expect_success 'first commit is still available' \
   '
   git log $first_commit
   '

test_done

back to top