git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / Atom feed
fbedfe7b4a2ff069bb4a1d350984d46737e2e52c blob 3811 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
 
#!/bin/sh
#
# Copyright (c) 2019 Denton Liu
#

test_description='ensure rebase fast-forwards commits when possible'

. ./test-lib.sh

test_expect_success setup '
	test_commit A &&
	test_commit B &&
	test_commit C &&
	test_commit D &&
	git checkout -t -b side
'

test_rebase_same_head () {
	status_n="$1" &&
	shift &&
	what_n="$1" &&
	shift &&
	cmp_n="$1" &&
	shift &&
	status_f="$1" &&
	shift &&
	what_f="$1" &&
	shift &&
	cmp_f="$1" &&
	shift &&
	test_rebase_same_head_ $status_n $what_n $cmp_n "" "$*" &&
	test_rebase_same_head_ $status_f $what_f $cmp_f " --no-ff" "$*"
}

test_rebase_same_head_ () {
	status="$1" &&
	shift &&
	what="$1" &&
	shift &&
	cmp="$1" &&
	shift &&
	flag="$1"
	shift &&
	test_expect_$status "git rebase$flag $* with $changes is $what with $cmp HEAD" "
		oldhead=\$(git rev-parse HEAD) &&
		test_when_finished 'git reset --hard \$oldhead' &&
		git rebase$flag $* >stdout &&
		if test $what = work
		then
			# Must check this case first, for 'is up to
			# date, rebase forced[...]rewinding head' cases
			test_i18ngrep 'rewinding head' stdout
		elif test $what = noop
		then
			test_i18ngrep 'is up to date' stdout &&
			! test_i18ngrep 'rebase forced' stdout
		elif test $what = noop-force
		then
			test_i18ngrep 'is up to date, rebase forced' stdout
		fi &&
		newhead=\$(git rev-parse HEAD) &&
		if test $cmp = same
		then
			test_cmp_rev \$oldhead \$newhead
		elif test $cmp = diff
		then
			! test_cmp_rev \$oldhead \$newhead
		fi
	"
}

changes='no changes'
test_rebase_same_head success noop same success work same
test_rebase_same_head success noop same success noop-force same master
test_rebase_same_head success noop same success noop-force diff --onto B B
test_rebase_same_head success noop same success noop-force diff --onto B... B
test_rebase_same_head success noop same success noop-force same --onto master... master
test_rebase_same_head success noop same success noop-force same --no-fork-point
test_rebase_same_head success noop same success work same --fork-point master
test_rebase_same_head success noop same success work diff --fork-point --onto B B
test_rebase_same_head success noop same success work diff --fork-point --onto B... B
test_rebase_same_head success noop same success work same --fork-point --onto master... master

test_expect_success 'add work same to side' '
	test_commit E
'

changes='our changes'
test_rebase_same_head success noop same success work same
test_rebase_same_head success noop same success noop-force same master
test_rebase_same_head success noop same success noop-force diff --onto B B
test_rebase_same_head success noop same success noop-force diff --onto B... B
test_rebase_same_head success noop same success noop-force same --onto master... master
test_rebase_same_head success noop same success noop-force same --no-fork-point
test_rebase_same_head success noop same success work same --fork-point master
test_rebase_same_head success noop same success work diff --fork-point --onto B B
test_rebase_same_head success noop same success work diff --fork-point --onto B... B
test_rebase_same_head success noop same success work same --fork-point --onto master... master

test_expect_success 'add work same to upstream' '
	git checkout master &&
	test_commit F &&
	git checkout side
'

changes='our and their changes'
test_rebase_same_head success noop same success noop-force diff --onto B B
test_rebase_same_head success noop same success noop-force diff --onto B... B
test_rebase_same_head success noop same success work diff --onto master... master
test_rebase_same_head failure work same success work diff --fork-point --onto B B
test_rebase_same_head failure work same success work diff --fork-point --onto B... B
test_rebase_same_head success noop same success work diff --fork-point --onto master... master

test_done
debug log:

solving fbedfe7b4a ...
found fbedfe7b4a in https://public-inbox.org/git/4dab5847cbb7d40efc02cbd89203df6ff192a5b1.1566724236.git.liu.denton@gmail.com/
	https://public-inbox.org/git/126c20a95d1d7afa4e0cba384fbd08a4bea43614.1566884063.git.liu.denton@gmail.com/
found d9957e5f1e in https://public-inbox.org/git/becb924232d70520ba19c67efcd6b18a0a3c6b9d.1566724236.git.liu.denton@gmail.com/
	https://public-inbox.org/git/3f208421d672215e1f65097f87e823edfca78886.1566884063.git.liu.denton@gmail.com/
found 02b2516595 in https://public-inbox.org/git/48b4e41a17d98b2f3a4254ed37c76361c3abc9ba.1566724236.git.liu.denton@gmail.com/
	https://public-inbox.org/git/48b4e41a17d98b2f3a4254ed37c76361c3abc9ba.1566884063.git.liu.denton@gmail.com/
found d9f20fa07c in https://80x24.org/mirrors/git.git
preparing index
index prepared:
100755 d9f20fa07c47d2c2da1867ef802c4c0ab6f1f876	t/t3432-rebase-fast-forward.sh

applying [1/6] https://public-inbox.org/git/48b4e41a17d98b2f3a4254ed37c76361c3abc9ba.1566724236.git.liu.denton@gmail.com/
diff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh
index d9f20fa07c..02b2516595 100755

Checking patch t/t3432-rebase-fast-forward.sh...
Applied patch t/t3432-rebase-fast-forward.sh cleanly.

skipping https://public-inbox.org/git/48b4e41a17d98b2f3a4254ed37c76361c3abc9ba.1566884063.git.liu.denton@gmail.com/ for 02b2516595
index at:
100755 02b2516595ac1f206fa83400bdc2c9baa1b5520f	t/t3432-rebase-fast-forward.sh

applying [2/6] https://public-inbox.org/git/becb924232d70520ba19c67efcd6b18a0a3c6b9d.1566724236.git.liu.denton@gmail.com/
diff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh
index 02b2516595..d9957e5f1e 100755

Checking patch t/t3432-rebase-fast-forward.sh...
Applied patch t/t3432-rebase-fast-forward.sh cleanly.

skipping https://public-inbox.org/git/3f208421d672215e1f65097f87e823edfca78886.1566884063.git.liu.denton@gmail.com/ for d9957e5f1e
index at:
100755 d9957e5f1e1c65a87ea51a15f66d38e30c9ceb25	t/t3432-rebase-fast-forward.sh

applying [3/6] https://public-inbox.org/git/4dab5847cbb7d40efc02cbd89203df6ff192a5b1.1566724236.git.liu.denton@gmail.com/
diff --git a/t/t3432-rebase-fast-forward.sh b/t/t3432-rebase-fast-forward.sh
index d9957e5f1e..fbedfe7b4a 100755

Checking patch t/t3432-rebase-fast-forward.sh...
Applied patch t/t3432-rebase-fast-forward.sh cleanly.

skipping https://public-inbox.org/git/126c20a95d1d7afa4e0cba384fbd08a4bea43614.1566884063.git.liu.denton@gmail.com/ for fbedfe7b4a
index at:
100755 fbedfe7b4a2ff069bb4a1d350984d46737e2e52c	t/t3432-rebase-fast-forward.sh

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

Archives are clonable:
	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

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.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

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