git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
465145c487f5a17b82fbd7788152925d2ce9d013 blob 2045 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
 
#!/bin/sh
#
# Copyright (c) 2015 Twitter, Inc
#

test_description='Test merging of notes trees in multiple worktrees'

. ./test-lib.sh

test_expect_success 'setup commit' '
	test_commit tantrum
'

commit_tantrum=$(git rev-parse tantrum^{commit})

test_expect_success 'setup notes ref (x)' '
	git config core.notesRef refs/notes/x &&
	git notes add -m "x notes on tantrum" tantrum
'

test_expect_success 'setup local branch (y)' '
	git update-ref refs/notes/y refs/notes/x &&
	git config core.notesRef refs/notes/y &&
	git notes remove tantrum
'

test_expect_success 'setup remote branch (z)' '
	git update-ref refs/notes/z refs/notes/x &&
	git config core.notesRef refs/notes/z &&
	git notes add -f -m "conflicting notes on tantrum" tantrum
'

test_expect_success 'modify notes ref ourselves (x)' '
	git config core.notesRef refs/notes/x &&
	git notes add -f -m "more conflicting notes on tantrum" tantrum
'

test_expect_success 'create some new worktrees' '
	git worktree add -b newbranch worktree main &&
	git worktree add -b newbranch2 worktree2 main
'

test_expect_success 'merge z into y fails and sets NOTES_MERGE_REF' '
	git config core.notesRef refs/notes/y &&
	test_must_fail git notes merge z &&
	echo "ref: refs/notes/y" >expect &&
	test_cmp expect .git/NOTES_MERGE_REF
'

test_expect_success 'merge z into y while mid-merge in another workdir fails' '
	(
		cd worktree &&
		git config core.notesRef refs/notes/y &&
		test_must_fail git notes merge z 2>err &&
		test_i18ngrep "a notes merge into refs/notes/y is already in-progress at" err
	) &&
	test_path_is_missing .git/worktrees/worktree/NOTES_MERGE_REF
'

test_expect_success 'merge z into x while mid-merge on y succeeds' '
	(
		cd worktree2 &&
		git config core.notesRef refs/notes/x &&
		test_must_fail git notes merge z >out 2>&1 &&
		test_i18ngrep "Automatic notes merge failed" out &&
		grep -v "A notes merge into refs/notes/x is already in-progress in" out
	) &&
	echo "ref: refs/notes/x" >expect &&
	test_cmp expect .git/worktrees/worktree2/NOTES_MERGE_REF
'

test_done
debug log:

solving 465145c487 ...
found 465145c487 in https://public-inbox.org/git/0697ef9742af1ab15bd886990bbc0080bad6f41c.1605221039.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/aee29a0528462137af6811d22da50dfcad585b84.1605629548.git.gitgitgadget@gmail.com/
found 823fdbda1f in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100755 823fdbda1f32355e6db952976c1210b35fd452ec	t/t3320-notes-merge-worktrees.sh

applying [1/2] https://public-inbox.org/git/0697ef9742af1ab15bd886990bbc0080bad6f41c.1605221039.git.gitgitgadget@gmail.com/
diff --git a/t/t3320-notes-merge-worktrees.sh b/t/t3320-notes-merge-worktrees.sh
index 823fdbda1f..465145c487 100755

Checking patch t/t3320-notes-merge-worktrees.sh...
Applied patch t/t3320-notes-merge-worktrees.sh cleanly.

skipping https://public-inbox.org/git/aee29a0528462137af6811d22da50dfcad585b84.1605629548.git.gitgitgadget@gmail.com/ for 465145c487
index at:
100755 465145c487f5a17b82fbd7788152925d2ce9d013	t/t3320-notes-merge-worktrees.sh

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git