From: Michael J Gruber <git@drmicha.warpmail.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: git@vger.kernel.org,
Felipe Contreras <felipe.contreras@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t5801: properly test the test shell
Date: Thu, 25 Apr 2013 13:21:48 +0200 [thread overview]
Message-ID: <517911CC.2060902@drmicha.warpmail.net> (raw)
In-Reply-To: <51790C9D.8080901@viscovery.net>
Johannes Sixt venit, vidit, dixit 25.04.2013 12:59:
> Am 4/25/2013 12:09, schrieb Michael J Gruber:
>> fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a
>> test which was meant to skip the test unless the test shell is bash.
>> Unfortunately, it tests for the availability of bash only. But users can
>> opt to use a different shell (using SHELL_PATH) for the tests even though
>> bash is available.
>
> After my patch this morning ("avoid process substitution"), there is not
> much bashism left in git-remote-testgit:
Is that a patch you submitted?
> diff --git a/git-remote-testgit b/git-remote-testgit
> index e99d5fa..178d030 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
> @@ -70,7 +69,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"
> ;;
> @@ -89,7 +91,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)' |
>
> What's left is to take care of the shbang line, remove the bash
> check from t5801, make a proper commit from this patch. But I leave
> that to the interested reader. :-)
>
No, the problem (that I'm adressing) is not git-remote-testgit which
uses bash unconditionally, independent of SHELL_PATH.
The problem is bashism(s) in t5801 itself. That is completely orthogonal
to your (non-) patch.
Michael
next prev parent reply other threads:[~2013-04-25 11:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 10:09 [PATCH] t5801: properly test the test shell Michael J Gruber
2013-04-25 10:59 ` Johannes Sixt
2013-04-25 11:21 ` Michael J Gruber [this message]
2013-04-25 11:35 ` Johannes Sixt
2013-04-25 16:22 ` Junio C Hamano
2013-04-25 13:06 ` Torsten Bögershausen
2013-04-25 16:25 ` Junio C Hamano
2013-04-25 16:20 ` Junio C Hamano
2013-04-25 17:12 ` Junio C Hamano
2013-04-26 9:55 ` Michael J Gruber
2013-04-26 18:33 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517911CC.2060902@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.