Thread (5 messages) flat view 5 messages, 1 author, 2016-06-15
STALE3727d

[PATCH 1/3] git-remote-testgit: avoid process substitution

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:03
Subsystem: the rest · Maintainer: Linus Torvalds

From: Johannes Sixt <redacted>

The implementation of bash on Windows does not offer process substitution.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
---
 git-remote-testgit | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/git-remote-testgit b/git-remote-testgit
index 5fd09f9..643e4ae 100755
--- a/git-remote-testgit
+++ b/git-remote-testgit
@@ -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
 
-- 
1.8.3-rc0-121-gda9b90f
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help