summaryrefslogtreecommitdiff
path: root/git-remote-testgit
diff options
context:
space:
mode:
authorLibravatar Johannes Sixt <j.sixt@viscovery.net>2013-04-25 12:59:41 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-28 15:20:24 -0700
commit85d501ce63d3c3b1331f9e51252c128c95e0adf1 (patch)
tree5a9e9ff8e424ed7fd2363a6034a49aa1f2f815b9 /git-remote-testgit
parentgit-remote-testgit: avoid process substitution (diff)
downloadtgif-85d501ce63d3c3b1331f9e51252c128c95e0adf1.tar.xz
git-remote-testgit: further remove some bashisms
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Diffstat (limited to 'git-remote-testgit')
-rwxr-xr-xgit-remote-testgit13
1 files changed, 9 insertions, 4 deletions
diff --git a/git-remote-testgit b/git-remote-testgit
index 643e4aeb19..b5289493e2 100755
--- a/git-remote-testgit
+++ b/git-remote-testgit
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
# Copyright (c) 2012 Felipe Contreras
alias=$1
@@ -23,7 +23,6 @@ then
testgitmarks="$dir/testgit.marks"
test -e "$gitmarks" || >"$gitmarks"
test -e "$testgitmarks" || >"$testgitmarks"
- testgitmarks_args=( "--"{import,export}"-marks=$testgitmarks" )
fi
while read line
@@ -69,7 +68,10 @@ do
fi
echo "feature done"
- git fast-export "${testgitmarks_args[@]}" $refs |
+ git fast-export \
+ ${testgitmarks:+"--import-marks=$testgitmarks"} \
+ ${testgitmarks:+"--export-marks=$testgitmarks"} \
+ $refs |
sed -e "s#refs/heads/#${prefix}/heads/#g"
echo "done"
;;
@@ -88,7 +90,10 @@ do
before=$(git for-each-ref --format=' %(refname) %(objectname) ')
- git fast-import "${testgitmarks_args[@]}" --quiet
+ git fast-import \
+ ${testgitmarks:+"--import-marks=$testgitmarks"} \
+ ${testgitmarks:+"--export-marks=$testgitmarks"} \
+ --quiet
# figure out which refs were updated
git for-each-ref --format='%(refname) %(objectname)' |