File tree Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Expand file tree Collapse file tree 4 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 125
125
/git-remote-ftps
126
126
/git-remote-fd
127
127
/git-remote-ext
128
+ /git-remote-testgit
128
129
/git-remote-testpy
129
130
/git-remote-testsvn
130
131
/git-repack
Original file line number Diff line number Diff line change @@ -460,6 +460,7 @@ SCRIPT_SH += git-mergetool.sh
460
460
SCRIPT_SH += git-pull.sh
461
461
SCRIPT_SH += git-quiltimport.sh
462
462
SCRIPT_SH += git-rebase.sh
463
+ SCRIPT_SH += git-remote-testgit.sh
463
464
SCRIPT_SH += git-repack.sh
464
465
SCRIPT_SH += git-request-pull.sh
465
466
SCRIPT_SH += git-stash.sh
Original file line number Diff line number Diff line change 1
- #! /usr/ bin/env bash
1
+ #! /bin/sh
2
2
# Copyright (c) 2012 Felipe Contreras
3
3
4
4
alias=$1
23
23
testgitmarks=" $dir /testgit.marks"
24
24
test -e " $gitmarks " || > " $gitmarks "
25
25
test -e " $testgitmarks " || > " $testgitmarks "
26
- testgitmarks_args=( " --" {import,export}" -marks=$testgitmarks " )
27
26
fi
28
27
29
28
while read line
70
69
fi
71
70
72
71
echo " feature done"
73
- git fast-export " ${testgitmarks_args[@]} " $refs |
72
+ git fast-export \
73
+ ${testgitmarks: +" --import-marks=$testgitmarks " } \
74
+ ${testgitmarks: +" --export-marks=$testgitmarks " } \
75
+ $refs |
74
76
sed -e " s#refs/heads/#${prefix} /heads/#g"
75
77
echo " done"
76
78
;;
87
89
exit 1
88
90
fi
89
91
90
- before=$( git for-each-ref --format=' %(refname) %(objectname)' )
92
+ before=$( git for-each-ref --format=' %(refname) %(objectname) ' )
91
93
92
- git fast-import " ${testgitmarks_args[@]} " --quiet
93
-
94
- after=$( git for-each-ref --format=' %(refname) %(objectname)' )
94
+ git fast-import \
95
+ ${testgitmarks: +" --import-marks=$testgitmarks " } \
96
+ ${testgitmarks: +" --export-marks=$testgitmarks " } \
97
+ --quiet
95
98
96
99
# figure out which refs were updated
97
- join -e 0 -o ' 0 1.2 2.2 ' -a 2 <( echo " $before " ) <( echo " $after " ) |
98
- while read ref a b
100
+ git for-each-ref --format= ' %(refname) %(objectname) ' |
101
+ while read ref a
99
102
do
100
- test $a == $b && continue
103
+ case " $before " in
104
+ * " $ref $a " * )
105
+ continue ;; # unchanged
106
+ esac
101
107
if test -z " $GIT_REMOTE_TESTGIT_PUSH_ERROR "
102
108
then
103
109
echo " ok $ref "
Original file line number Diff line number Diff line change @@ -8,11 +8,6 @@ test_description='Test remote-helper import and export commands'
8
8
. ./test-lib.sh
9
9
. " $TEST_DIRECTORY " /lib-gpg.sh
10
10
11
- if ! type " ${BASH-bash} " > /dev/null 2>&1 ; then
12
- skip_all=' skipping remote-testgit tests, bash not available'
13
- test_done
14
- fi
15
-
16
11
compare_refs () {
17
12
git --git-dir=" $1 /.git" rev-parse --verify $2 > expect &&
18
13
git --git-dir=" $3 /.git" rev-parse --verify $4 > actual &&
You can’t perform that action at this time.
0 commit comments