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/t5502-quickfetch.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/t5502-quickfetch.sh')
-rwxr-xr-x | third_party/git/t/t5502-quickfetch.sh | 142 |
1 files changed, 0 insertions, 142 deletions
diff --git a/third_party/git/t/t5502-quickfetch.sh b/third_party/git/t/t5502-quickfetch.sh deleted file mode 100755 index 7a46cbdbe687..000000000000 --- a/third_party/git/t/t5502-quickfetch.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh - -test_description='test quickfetch from local' - -. ./test-lib.sh - -test_expect_success setup ' - - test_tick && - echo ichi >file && - git add file && - git commit -m initial && - - cnt=$( ( - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - test $cnt -eq 3 -' - -test_expect_success 'clone without alternate' ' - - ( - mkdir cloned && - cd cloned && - git init-db && - git remote add -f origin .. - ) && - cnt=$( ( - cd cloned && - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - test $cnt -eq 3 -' - -test_expect_success 'further commits in the original' ' - - test_tick && - echo ni >file && - git commit -a -m second && - - cnt=$( ( - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - test $cnt -eq 6 -' - -test_expect_success 'copy commit and tree but not blob by hand' ' - - git rev-list --objects HEAD | - git pack-objects --stdout | - ( - cd cloned && - git unpack-objects - ) && - - cnt=$( ( - cd cloned && - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - test $cnt -eq 6 && - - blob=$(git rev-parse HEAD:file | sed -e "s|..|&/|") && - test -f "cloned/.git/objects/$blob" && - rm -f "cloned/.git/objects/$blob" && - - cnt=$( ( - cd cloned && - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - test $cnt -eq 5 - -' - -test_expect_success 'quickfetch should not leave a corrupted repository' ' - - ( - cd cloned && - git fetch - ) && - - cnt=$( ( - cd cloned && - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - test $cnt -eq 6 - -' - -test_expect_success 'quickfetch should not copy from alternate' ' - - ( - mkdir quickclone && - cd quickclone && - git init-db && - (cd ../.git/objects && pwd) >.git/objects/info/alternates && - git remote add origin .. && - git fetch -k -k - ) && - obj_cnt=$( ( - cd quickclone && - git count-objects | sed -e "s/ *objects,.*//" - ) ) && - pck_cnt=$( ( - cd quickclone && - git count-objects -v | sed -n -e "/packs:/{ - s/packs:// - p - q - }" - ) ) && - origin_master=$( ( - cd quickclone && - git rev-parse origin/master - ) ) && - echo "loose objects: $obj_cnt, packfiles: $pck_cnt" && - test $obj_cnt -eq 0 && - test $pck_cnt -eq 0 && - test z$origin_master = z$(git rev-parse master) - -' - -test_expect_success 'quickfetch should handle ~1000 refs (on Windows)' ' - - git gc && - head=$(git rev-parse HEAD) && - branchprefix="$head refs/heads/branch" && - for i in 0 1 2 3 4 5 6 7 8 9; do - for j in 0 1 2 3 4 5 6 7 8 9; do - for k in 0 1 2 3 4 5 6 7 8 9; do - echo "$branchprefix$i$j$k" >> .git/packed-refs - done - done - done && - ( - cd cloned && - git fetch && - git fetch - ) - -' - -test_done |