git-remote-testgit: further remove some bashisms

Signed-off-by: Johannes Sixt <j6t@kdbg.org>

Johannes Sixt committed Apr 25, 2013 at 12:59 UTC 85d501ce63d3c3b1331f9e51252c128c95e0adf1
1 file changed +9 -4
git-remote-testgit
+9 -4
@@ -1,4 +1,4 @@
1 -#!/usr/bin/env bash
1 +#!/bin/sh
2 # Copyright (c) 2012 Felipe Contreras
3
4 alias=$1
@@ -23,7 +23,6 @@ then
23 testgitmarks="$dir/testgit.marks"
24 test -e "$gitmarks" || >"$gitmarks"
25 test -e "$testgitmarks" || >"$testgitmarks"
26 - testgitmarks_args=( "--"{import,export}"-marks=$testgitmarks" )
26 fi
27
28 while read line
@@ -69,7 +68,10 @@ do
68 fi
69
70 echo "feature done"
72 - git fast-export "${testgitmarks_args[@]}" $refs |
71 + git fast-export \
72 + ${testgitmarks:+"--import-marks=$testgitmarks"} \
73 + ${testgitmarks:+"--export-marks=$testgitmarks"} \
74 + $refs |
75 sed -e "s#refs/heads/#${prefix}/heads/#g"
76 echo "done"
77 ;;
@@ -88,7 +90,10 @@ do
90
91 before=$(git for-each-ref --format=' %(refname) %(objectname) ')
92
91 - git fast-import "${testgitmarks_args[@]}" --quiet
93 + git fast-import \
94 + ${testgitmarks:+"--import-marks=$testgitmarks"} \
95 + ${testgitmarks:+"--export-marks=$testgitmarks"} \
96 + --quiet
97
98 # figure out which refs were updated
99 git for-each-ref --format='%(refname) %(objectname)' |