git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
cc324bea5237e1a51cbec4951b54d38c74771103 blob 3163 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
 
#!/bin/sh

test_description='tests for ref^{stuff}'

. ./test-lib.sh

test_expect_success 'setup' '
	echo blob >a-blob &&
	git tag -a -m blob blob-tag $(git hash-object -w a-blob) &&
	mkdir a-tree &&
	echo moreblobs >a-tree/another-blob &&
	git add . &&
	TREE_SHA1=$(git write-tree) &&
	git tag -a -m tree tree-tag "$TREE_SHA1" &&
	git commit -m Initial &&
	git tag -a -m commit commit-tag &&
	git branch ref &&
	git checkout main &&
	echo modified >>a-blob &&
	git add -u &&
	git commit -m Modified &&
	git branch modref &&
	echo changed! >>a-blob &&
	git add -u &&
	git commit -m !Exp &&
	git branch expref &&
	echo changed >>a-blob &&
	git add -u &&
	git commit -m Changed &&
	echo changed-again >>a-blob &&
	git add -u &&
	git commit -m Changed-again
'

test_expect_success 'ref^{non-existent}' '
	test_must_fail git rev-parse ref^{non-existent}
'

test_expect_success 'ref^{}' '
	git rev-parse ref >expected &&
	git rev-parse ref^{} >actual &&
	test_cmp expected actual &&
	git rev-parse commit-tag^{} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{commit}' '
	git rev-parse ref >expected &&
	git rev-parse ref^{commit} >actual &&
	test_cmp expected actual &&
	git rev-parse commit-tag^{commit} >actual &&
	test_cmp expected actual &&
	test_must_fail git rev-parse tree-tag^{commit} &&
	test_must_fail git rev-parse blob-tag^{commit}
'

test_expect_success 'ref^{tree}' '
	echo $TREE_SHA1 >expected &&
	git rev-parse ref^{tree} >actual &&
	test_cmp expected actual &&
	git rev-parse commit-tag^{tree} >actual &&
	test_cmp expected actual &&
	git rev-parse tree-tag^{tree} >actual &&
	test_cmp expected actual &&
	test_must_fail git rev-parse blob-tag^{tree}
'

test_expect_success 'ref^{tag}' '
	test_must_fail git rev-parse HEAD^{tag} &&
	git rev-parse commit-tag >expected &&
	git rev-parse commit-tag^{tag} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{/.}' '
	git rev-parse main >expected &&
	git rev-parse main^{/.} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{/non-existent}' '
	test_must_fail git rev-parse main^{/non-existent}
'

test_expect_success 'ref^{/Initial}' '
	git rev-parse ref >expected &&
	git rev-parse main^{/Initial} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{/!Exp}' '
	test_must_fail git rev-parse main^{/!Exp}
'

test_expect_success 'ref^{/!}' '
	test_must_fail git rev-parse main^{/!}
'

test_expect_success 'ref^{/!!Exp}' '
	git rev-parse expref >expected &&
	git rev-parse main^{/!!Exp} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{/!-}' '
	test_must_fail git rev-parse main^{/!-}
'

test_expect_success 'ref^{/!-.}' '
	test_must_fail git rev-parse main^{/!-.}
'

test_expect_success 'ref^{/!-non-existent}' '
	git rev-parse main >expected &&
	git rev-parse main^{/!-non-existent} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{/!-Changed}' '
	git rev-parse expref >expected &&
	git rev-parse main^{/!-Changed} >actual &&
	test_cmp expected actual
'

test_expect_success 'ref^{/!-!Exp}' '
	git rev-parse modref >expected &&
	git rev-parse expref^{/!-!Exp} >actual &&
	test_cmp expected actual
'

test_done
debug log:

solving cc324bea52 ...
found cc324bea52 in https://public-inbox.org/git/830130fa9fff3bf39e9f5b0360160e9ff787deec.1605221038.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/b8fa037791683b50c3efb01aa6ac0d3f7b888a2b.1605629548.git.gitgitgadget@gmail.com/
found e0a49a651f in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100755 e0a49a651fdd3b3f7d9e0f24e00439c9642f896c	t/t1511-rev-parse-caret.sh

applying [1/2] https://public-inbox.org/git/830130fa9fff3bf39e9f5b0360160e9ff787deec.1605221038.git.gitgitgadget@gmail.com/
diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh
index e0a49a651f..cc324bea52 100755

Checking patch t/t1511-rev-parse-caret.sh...
Applied patch t/t1511-rev-parse-caret.sh cleanly.

skipping https://public-inbox.org/git/b8fa037791683b50c3efb01aa6ac0d3f7b888a2b.1605629548.git.gitgitgadget@gmail.com/ for cc324bea52
index at:
100755 cc324bea5237e1a51cbec4951b54d38c74771103	t/t1511-rev-parse-caret.sh

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).