aboutsummaryrefslogtreecommitdiffstats
path: root/test/tests/filter-directory-prune-branches.success
blob: 7bd7c0b9aa6ca9af14e4977fb50878575afd4ba9 (plain) (blame)
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
#!/bin/sh

. "$(cd -- "$(dirname -- "${0}")" && pwd -P)/../bootstrap"

initializeRepositories

"${BIN_MAIN}" ${BIN_MAIN_OPTIONS} --workdir "${DIR_TEMP}" -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}"

echo 'Fetching initial branches'
actualBranches="$(getBranchList "${DIR_DESTINATION}")"
expectedBrances='master slave'
if test "${actualBranches}" != "${expectedBrances}"
then
	printf 'Expected branches: %s\nResulting branches: %s\n' "${expectedBrances}" "${actualBranches}">&2
	exit 1
fi

"${BIN_MAIN}" ${BIN_MAIN_OPTIONS} --workdir "${DIR_TEMP}" --branch-blacklist 'slave' --prune-branches -- "${DIR_SOURCE}" '--prune-empty --subdirectory-filter subdir' "${DIR_DESTINATION}"

echo 'Fetching final branches'
actualBranches="$(getBranchList "${DIR_DESTINATION}")"
expectedBrances='master'
if test "${actualBranches}" != "${expectedBrances}"
then
	printf 'Expected branches: %s\nResulting branches: %s\n' "${expectedBrances}" "${actualBranches}">&2
	exit 1
fi

© 2014-2024 Faster IT GmbH | imprint | privacy policy