diff options
author | Vincent Ambo <mail@tazj.in> | 2021-09-21T10·03+0300 |
---|---|---|
committer | Vincent Ambo <mail@tazj.in> | 2021-09-21T11·29+0300 |
commit | 43b1791ec601732ac31195df96781a848360a9ac (patch) | |
tree | daae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/t1701-racy-split-index.sh | |
parent | 2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff) |
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping it in sync with cgit would be easier this way, but it has proven not to be a big issue. On the other hand, a vendored copy of git is an annoying maintenance burden. It is much easier to rebase the single (dottime) patch that we have. This removes the vendored copy of git and instead passes the git source code to cgit via `pkgs.srcOnly`, which includes the applied patch so that cgit can continue rendering dottime. Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/t/t1701-racy-split-index.sh')
-rwxr-xr-x | third_party/git/t/t1701-racy-split-index.sh | 214 |
1 files changed, 0 insertions, 214 deletions
diff --git a/third_party/git/t/t1701-racy-split-index.sh b/third_party/git/t/t1701-racy-split-index.sh deleted file mode 100755 index 5dc221ef382d..000000000000 --- a/third_party/git/t/t1701-racy-split-index.sh +++ /dev/null @@ -1,214 +0,0 @@ -#!/bin/sh - -# This test can give false success if your machine is sufficiently -# slow or all trials happened to happen on second boundaries. - -test_description='racy split index' - -. ./test-lib.sh - -test_expect_success 'setup' ' - # Only split the index when the test explicitly says so. - sane_unset GIT_TEST_SPLIT_INDEX && - git config splitIndex.maxPercentChange 100 && - - echo "cached content" >racy-file && - git add racy-file && - git commit -m initial && - - echo something >other-file && - # No raciness with this file. - test-tool chmtime =-20 other-file && - - echo "+cached content" >expect -' - -check_cached_diff () { - git diff-index --patch --cached $EMPTY_TREE racy-file >diff && - tail -1 diff >actual && - test_cmp expect actual -} - -trials="0 1 2 3 4" -for trial in $trials -do - test_expect_success "split the index while adding a racily clean file #$trial" ' - rm -f .git/index .git/sharedindex.* && - - # The next three commands must be run within the same - # second (so both writes to racy-file result in the same - # mtime) to create the interesting racy situation. - echo "cached content" >racy-file && - - # Update and split the index. The cache entry of - # racy-file will be stored only in the shared index. - git update-index --split-index --add racy-file && - - # File size must stay the same. - echo "dirty worktree" >racy-file && - - # Subsequent git commands should notice that racy-file - # and the split index have the same mtime, and check - # the content of the file to see if it is actually - # clean. - check_cached_diff - ' -done - -for trial in $trials -do - test_expect_success "add a racily clean file to an already split index #$trial" ' - rm -f .git/index .git/sharedindex.* && - - git update-index --split-index && - - # The next three commands must be run within the same - # second. - echo "cached content" >racy-file && - - # Update the split index. The cache entry of racy-file - # will be stored only in the split index. - git update-index --add racy-file && - - # File size must stay the same. - echo "dirty worktree" >racy-file && - - # Subsequent git commands should notice that racy-file - # and the split index have the same mtime, and check - # the content of the file to see if it is actually - # clean. - check_cached_diff - ' -done - -for trial in $trials -do - test_expect_success "split the index when the index contains a racily clean cache entry #$trial" ' - rm -f .git/index .git/sharedindex.* && - - # The next three commands must be run within the same - # second. - echo "cached content" >racy-file && - - git update-index --add racy-file && - - # File size must stay the same. - echo "dirty worktree" >racy-file && - - # Now wait a bit to ensure that the split index written - # below will get a more recent mtime than racy-file. - sleep 1 && - - # Update and split the index when the index contains - # the racily clean cache entry of racy-file. - # A corresponding replacement cache entry with smudged - # stat data should be added to the new split index. - git update-index --split-index --add other-file && - - # Subsequent git commands should notice the smudged - # stat data in the replacement cache entry and that it - # doesnt match with the file the worktree. - check_cached_diff - ' -done - -for trial in $trials -do - test_expect_success "update the split index when it contains a new racily clean cache entry #$trial" ' - rm -f .git/index .git/sharedindex.* && - - git update-index --split-index && - - # The next three commands must be run within the same - # second. - echo "cached content" >racy-file && - - # Update the split index. The cache entry of racy-file - # will be stored only in the split index. - git update-index --add racy-file && - - # File size must stay the same. - echo "dirty worktree" >racy-file && - - # Now wait a bit to ensure that the split index written - # below will get a more recent mtime than racy-file. - sleep 1 && - - # Update the split index when the racily clean cache - # entry of racy-file is only stored in the split index. - # An updated cache entry with smudged stat data should - # be added to the new split index. - git update-index --add other-file && - - # Subsequent git commands should notice the smudged - # stat data. - check_cached_diff - ' -done - -for trial in $trials -do - test_expect_success "update the split index when a racily clean cache entry is stored only in the shared index #$trial" ' - rm -f .git/index .git/sharedindex.* && - - # The next three commands must be run within the same - # second. - echo "cached content" >racy-file && - - # Update and split the index. The cache entry of - # racy-file will be stored only in the shared index. - git update-index --split-index --add racy-file && - - # File size must stay the same. - echo "dirty worktree" >racy-file && - - # Now wait a bit to ensure that the split index written - # below will get a more recent mtime than racy-file. - sleep 1 && - - # Update the split index when the racily clean cache - # entry of racy-file is only stored in the shared index. - # A corresponding replacement cache entry with smudged - # stat data should be added to the new split index. - git update-index --add other-file && - - # Subsequent git commands should notice the smudged - # stat data. - check_cached_diff - ' -done - -for trial in $trials -do - test_expect_success "update the split index after unpack trees() copied a racily clean cache entry from the shared index #$trial" ' - rm -f .git/index .git/sharedindex.* && - - # The next three commands must be run within the same - # second. - echo "cached content" >racy-file && - - # Update and split the index. The cache entry of - # racy-file will be stored only in the shared index. - git update-index --split-index --add racy-file && - - # File size must stay the same. - echo "dirty worktree" >racy-file && - - # Now wait a bit to ensure that the split index written - # below will get a more recent mtime than racy-file. - sleep 1 && - - # Update the split index after unpack_trees() copied the - # racily clean cache entry of racy-file from the shared - # index. A corresponding replacement cache entry - # with smudged stat data should be added to the new - # split index. - git read-tree -m HEAD && - - # Subsequent git commands should notice the smudged - # stat data. - check_cached_diff - ' -done - -test_done |