Skip to content

Commit

Permalink
git-remote-testgit: avoid process substitution
Browse files Browse the repository at this point in the history
The implementation of bash on Windows does not offer process substitution.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Apr 27, 2013
1 parent 1afe6e4 commit 752db42
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions git-remote-testgit
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,18 @@ do
exit 1
fi

before=$(git for-each-ref --format='%(refname) %(objectname)')
before=$(git for-each-ref --format=' %(refname) %(objectname) ')

git fast-import "${testgitmarks_args[@]}" --quiet

after=$(git for-each-ref --format='%(refname) %(objectname)')

# figure out which refs were updated
join -e 0 -o '0 1.2 2.2' -a 2 <(echo "$before") <(echo "$after") |
while read ref a b
git for-each-ref --format='%(refname) %(objectname)' |
while read ref a
do
test $a == $b && continue
case "$before" in
*" $ref $a "*)
continue ;; # unchanged
esac
echo "ok $ref"
done

Expand Down

0 comments on commit 752db42

Please sign in to comment.