File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ testsdir=$( dirname " $( readlink -f $0 ) " )
5+
6+ . $testsdir /functions.sh
7+
8+
9+ initialise_git_repo
10+
11+ git -C $PRIMARY tag -a ' tag-a' -m ' add tag a'
12+ git -C $PRIMARY tag -a ' tag-b' -m ' add tag b'
13+
14+
15+ message " Pushing to remote ..."
16+ GIT_ALLOW_UNSIGNED=y git -C $PRIMARY push origin master --tags
17+ orig_master=$( git -C $PRIMARY rev-parse master)
18+ test -f $REMOTE /$orig_master || {
19+ fatal " missing commit in the remote!"
20+ }
21+
22+ GIT_ALLOW_UNSIGNED=y git -C $PRIMARY push --delete origin tag-a
23+ GIT_ALLOW_UNSIGNED=y git -C $PRIMARY push origin :tag-b
24+
25+
26+ message " Fetching from remote ..."
27+ git clone example://$REMOTE $SECONDARY
28+ test " $( git -C $SECONDARY tag) " = ' v1.0'
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ run_test() {
1010 echo >&2
1111}
1212
13+ # Uncomment to get more information about synchronisation
14+ # export GIT_EXAMPLE_VERBOSE=1
15+
16+
1317# Clone and fetch ‘master’
1418run_test clone.sh
1519
@@ -21,3 +25,6 @@ run_test hard-push.sh
2125
2226# Merged branches
2327run_test merge.sh
28+
29+ # Removal of remote references
30+ run_test remove-refs.sh
You can’t perform that action at this time.
0 commit comments