Skip to content

Commit

Permalink
git-remote-testgit: further remove some bashisms
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Apr 28, 2013
1 parent 752db42 commit 85d501c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions git-remote-testgit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
# Copyright (c) 2012 Felipe Contreras

alias=$1
Expand All @@ -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
Expand Down Expand Up @@ -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"
;;
Expand All @@ -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)' |
Expand Down

0 comments on commit 85d501c

Please sign in to comment.