summaryrefslogtreecommitdiff
path: root/git-remote-testgit
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2012-11-28 22:11:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-11-29 20:18:45 (GMT)
commit93b5cf9cd12a0b9491559429969b351daa3638a5 (patch)
tree6249c5e33eb59a7e93108903e209f68f23b86cd1 /git-remote-testgit
parentee10fbf90c74c14ae16a27f4bce8a2dd1704c9cb (diff)
downloadgit-93b5cf9cd12a0b9491559429969b351daa3638a5.zip
git-93b5cf9cd12a0b9491559429969b351daa3638a5.tar.gz
git-93b5cf9cd12a0b9491559429969b351daa3638a5.tar.bz2
remote-testgit: report success after an import
Doesn't make a difference for the tests, but it does for the ones seeking reference. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-remote-testgit')
-rwxr-xr-xgit-remote-testgit13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-remote-testgit b/git-remote-testgit
index efda74b..6fb8780 100755
--- a/git-remote-testgit
+++ b/git-remote-testgit
@@ -65,7 +65,20 @@ do
sed -e "s#refs/heads/#${prefix}/heads/#g"
;;
export)
+ 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
+ do
+ test $a == $b && continue
+ echo "ok $ref"
+ done
+
echo
;;
'')