about summary refs log tree commit diff
path: root/third_party/git/t/t3204-branch-name-interpretation.sh
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-21T10·03+0300
committerVincent Ambo <mail@tazj.in>2021-09-21T11·29+0300
commit43b1791ec601732ac31195df96781a848360a9ac (patch)
treedaae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/t3204-branch-name-interpretation.sh
parent2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (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/t3204-branch-name-interpretation.sh')
-rwxr-xr-xthird_party/git/t/t3204-branch-name-interpretation.sh133
1 files changed, 0 insertions, 133 deletions
diff --git a/third_party/git/t/t3204-branch-name-interpretation.sh b/third_party/git/t/t3204-branch-name-interpretation.sh
deleted file mode 100755
index 698d9cc4f3d6..000000000000
--- a/third_party/git/t/t3204-branch-name-interpretation.sh
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/bin/sh
-
-test_description='interpreting exotic branch name arguments
-
-Branch name arguments are usually names which are taken to be inside of
-refs/heads/, but we interpret some magic syntax like @{-1}, @{upstream}, etc.
-This script aims to check the behavior of those corner cases.
-'
-. ./test-lib.sh
-
-expect_branch() {
-	git log -1 --format=%s "$1" >actual &&
-	echo "$2" >expect &&
-	test_cmp expect actual
-}
-
-expect_deleted() {
-	test_must_fail git rev-parse --verify "$1"
-}
-
-test_expect_success 'set up repo' '
-	test_commit one &&
-	test_commit two &&
-	git remote add origin foo.git
-'
-
-test_expect_success 'update branch via @{-1}' '
-	git branch previous one &&
-
-	git checkout previous &&
-	git checkout master &&
-
-	git branch -f @{-1} two &&
-	expect_branch previous two
-'
-
-test_expect_success 'update branch via local @{upstream}' '
-	git branch local one &&
-	git branch --set-upstream-to=local &&
-
-	git branch -f @{upstream} two &&
-	expect_branch local two
-'
-
-test_expect_success 'disallow updating branch via remote @{upstream}' '
-	git update-ref refs/remotes/origin/remote one &&
-	git branch --set-upstream-to=origin/remote &&
-
-	test_must_fail git branch -f @{upstream} two
-'
-
-test_expect_success 'create branch with pseudo-qualified name' '
-	git branch refs/heads/qualified two &&
-	expect_branch refs/heads/refs/heads/qualified two
-'
-
-test_expect_success 'delete branch via @{-1}' '
-	git branch previous-del &&
-
-	git checkout previous-del &&
-	git checkout master &&
-
-	git branch -D @{-1} &&
-	expect_deleted previous-del
-'
-
-test_expect_success 'delete branch via local @{upstream}' '
-	git branch local-del &&
-	git branch --set-upstream-to=local-del &&
-
-	git branch -D @{upstream} &&
-	expect_deleted local-del
-'
-
-test_expect_success 'delete branch via remote @{upstream}' '
-	git update-ref refs/remotes/origin/remote-del two &&
-	git branch --set-upstream-to=origin/remote-del &&
-
-	git branch -r -D @{upstream} &&
-	expect_deleted origin/remote-del
-'
-
-# Note that we create two oddly named local branches here. We want to make
-# sure that we do not accidentally delete either of them, even if
-# shorten_unambiguous_ref() tweaks the name to avoid ambiguity.
-test_expect_success 'delete @{upstream} expansion matches -r option' '
-	git update-ref refs/remotes/origin/remote-del two &&
-	git branch --set-upstream-to=origin/remote-del &&
-	git update-ref refs/heads/origin/remote-del two &&
-	git update-ref refs/heads/remotes/origin/remote-del two &&
-
-	test_must_fail git branch -D @{upstream} &&
-	expect_branch refs/heads/origin/remote-del two &&
-	expect_branch refs/heads/remotes/origin/remote-del two
-'
-
-test_expect_success 'disallow deleting remote branch via @{-1}' '
-	git update-ref refs/remotes/origin/previous one &&
-
-	git checkout -b origin/previous two &&
-	git checkout master &&
-
-	test_must_fail git branch -r -D @{-1} &&
-	expect_branch refs/remotes/origin/previous one &&
-	expect_branch refs/heads/origin/previous two
-'
-
-# The thing we are testing here is that "@" is the real branch refs/heads/@,
-# and not refs/heads/HEAD. These tests should not imply that refs/heads/@ is a
-# sane thing, but it _is_ technically allowed for now. If we disallow it, these
-# can be switched to test_must_fail.
-test_expect_success 'create branch named "@"' '
-	git branch -f @ one &&
-	expect_branch refs/heads/@ one
-'
-
-test_expect_success 'delete branch named "@"' '
-	git update-ref refs/heads/@ two &&
-	git branch -D @ &&
-	expect_deleted refs/heads/@
-'
-
-test_expect_success 'checkout does not treat remote @{upstream} as a branch' '
-	git update-ref refs/remotes/origin/checkout one &&
-	git branch --set-upstream-to=origin/checkout &&
-	git update-ref refs/heads/origin/checkout two &&
-	git update-ref refs/heads/remotes/origin/checkout two &&
-
-	git checkout @{upstream} &&
-	expect_branch HEAD one
-'
-
-test_done