From 43b1791ec601732ac31195df96781a848360a9ac Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 21 Sep 2021 13:03:01 +0300 Subject: chore(3p/git): Unvendor git and track patches instead 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 --- .../git/t/t6007-rev-list-cherry-pick-file.sh | 269 --------------------- 1 file changed, 269 deletions(-) delete mode 100755 third_party/git/t/t6007-rev-list-cherry-pick-file.sh (limited to 'third_party/git/t/t6007-rev-list-cherry-pick-file.sh') diff --git a/third_party/git/t/t6007-rev-list-cherry-pick-file.sh b/third_party/git/t/t6007-rev-list-cherry-pick-file.sh deleted file mode 100755 index f0268372d25e..000000000000 --- a/third_party/git/t/t6007-rev-list-cherry-pick-file.sh +++ /dev/null @@ -1,269 +0,0 @@ -#!/bin/sh - -test_description='test git rev-list --cherry-pick -- file' - -. ./test-lib.sh - -# A---B---D---F -# \ -# \ -# C---E -# -# B changes a file foo.c, adding a line of text. C changes foo.c as -# well as bar.c, but the change in foo.c was identical to change B. -# D and C change bar in the same way, E and F differently. - -test_expect_success setup ' - 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 && - echo Dello > bar && - git add bar && - test_tick && - git commit -m "E" && - git tag E && - git checkout master && - git checkout branch foo && - test_tick && - git commit -m "B" && - git tag B && - echo Cello > bar && - git add bar && - test_tick && - git commit -m "D" && - git tag D && - echo Nello > bar && - git add bar && - test_tick && - git commit -m "F" && - git tag F -' - -cat >expect <tags/C -EOF - -test_expect_success '--left-right' ' - git rev-list --left-right B...C > actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -test_expect_success '--count' ' - git rev-list --count B...C > actual && - test "$(cat actual)" = 2 -' - -test_expect_success '--cherry-pick foo comes up empty' ' - test -z "$(git rev-list --left-right --cherry-pick B...C -- foo)" -' - -cat >expect <tags/C -EOF - -test_expect_success '--cherry-pick bar does not come up empty' ' - git rev-list --left-right --cherry-pick B...C -- bar > actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -test_expect_success 'bar does not come up empty' ' - git rev-list --left-right B...C -- bar > actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -cat >expect <tags/E -EOF - -test_expect_success '--cherry-pick bar does not come up empty (II)' ' - git rev-list --left-right --cherry-pick F...E -- bar > actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -test_expect_success 'name-rev multiple --refs combine inclusive' ' - git rev-list --left-right --cherry-pick F...E -- bar >actual && - git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" \ - actual.named && - test_cmp expect actual.named -' - -cat >expect <>expect && - git rev-list --left-right --cherry-pick F...E -- bar >actual && - git name-rev --stdin --name-only --refs="*tags/F" \ - actual.named && - test_cmp expect actual.named -' - -cat >expect <>expect && - git rev-list --left-right --cherry-pick F...E -- bar >actual && - git name-rev --stdin --name-only --refs="*tags/*" --exclude="*E" \ - actual.named && - test_cmp expect actual.named -' - -test_expect_success 'name-rev --no-refs clears the refs list' ' - git rev-list --left-right --cherry-pick F...E -- bar >expect && - git name-rev --stdin --name-only --refs="*tags/F" --refs="*tags/E" --no-refs --refs="*tags/G" \ - actual && - test_cmp expect actual -' - -cat >expect < actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -cat >expect <tags/E -=tags/C -EOF - -test_expect_success '--cherry-mark --left-right' ' - git rev-list --cherry-mark --left-right F...E -- bar > actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -cat >expect < actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -test_expect_success '--cherry-pick --left-only' ' - git rev-list --cherry-pick --left-only E...F -- bar > actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -cat >expect < actual && - git name-rev --stdin --name-only --refs="*tags/*" \ - < actual > actual.named && - test_cmp expect actual.named -' - -cat >expect < actual && - test_cmp expect actual -' - -cat >expect < actual && - test_cmp expect actual -' - -cat >expect < actual && - test_cmp expect actual -' - -test_expect_success '--cherry-pick with independent, but identical branches' ' - 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)" -' - -cat >expect < actual && - test_cmp expect actual -' - -# Corrupt the object store deliberately to make sure -# the object is not even checked for its existence. -remove_loose_object () { - sha1="$(git rev-parse "$1")" && - remainder=${sha1#??} && - firsttwo=${sha1%$remainder} && - rm .git/objects/$firsttwo/$remainder -} - -test_expect_success '--cherry-pick avoids looking at full diffs' ' - git checkout -b shy-diff && - test_commit dont-look-at-me && - echo Hello >dont-look-at-me.t && - test_tick && - git commit -m tip dont-look-at-me.t && - git checkout -b mainline HEAD^ && - test_commit to-cherry-pick && - remove_loose_object shy-diff^:dont-look-at-me.t && - git rev-list --cherry-pick ...shy-diff -' - -test_done -- cgit 1.4.1