blob: 9d39fec4a973c776ed471b9fcc0c7dfa53caf721 (
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}" --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}" --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
|