File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 125125/git-remote-ftps
126126/git-remote-fd
127127/git-remote-ext
128+ /git-remote-testgit
128129/git-remote-testpy
129130/git-remote-testsvn
130131/git-repack
Original file line number Diff line number Diff line change @@ -460,6 +460,7 @@ SCRIPT_SH += git-mergetool.sh
460460SCRIPT_SH += git-pull.sh
461461SCRIPT_SH += git-quiltimport.sh
462462SCRIPT_SH += git-rebase.sh
463+ SCRIPT_SH += git-remote-testgit.sh
463464SCRIPT_SH += git-repack.sh
464465SCRIPT_SH += git-request-pull.sh
465466SCRIPT_SH += git-stash.sh
Original file line number Diff line number Diff line change 1- #! /usr/ bin/env bash
1+ #! /bin/sh
22# Copyright (c) 2012 Felipe Contreras
33
44alias=$1
2323 testgitmarks=" $dir /testgit.marks"
2424 test -e " $gitmarks " || > " $gitmarks "
2525 test -e " $testgitmarks " || > " $testgitmarks "
26- testgitmarks_args=( " --" {import,export}" -marks=$testgitmarks " )
2726fi
2827
2928while read line
7069 fi
7170
7271 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 |
7476 sed -e " s#refs/heads/#${prefix} /heads/#g"
7577 echo " done"
7678 ;;
8789 exit 1
8890 fi
8991
90- before=$( git for-each-ref --format=' %(refname) %(objectname)' )
92+ before=$( git for-each-ref --format=' %(refname) %(objectname) ' )
9193
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
9598
9699 # 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
99102 do
100- test $a == $b && continue
103+ case " $before " in
104+ * " $ref $a " * )
105+ continue ;; # unchanged
106+ esac
101107 if test -z " $GIT_REMOTE_TESTGIT_PUSH_ERROR "
102108 then
103109 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'
88. ./test-lib.sh
99. " $TEST_DIRECTORY " /lib-gpg.sh
1010
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-
1611compare_refs () {
1712 git --git-dir=" $1 /.git" rev-parse --verify $2 > expect &&
1813 git --git-dir=" $3 /.git" rev-parse --verify $4 > actual &&
You can’t perform that action at this time.
0 commit comments