Re: [PATCH] git-subtree: Avoid using echo -n even indirectly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 9, 2013 at 11:57 AM, Paolo G. Giarrusso
<p.giarrusso@xxxxxxxxx> wrote:
> diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
> index 7d7af03..ebfb78f 100755
> --- a/contrib/subtree/git-subtree.sh
> +++ b/contrib/subtree/git-subtree.sh
> @@ -592,7 +592,9 @@ cmd_split()
>         eval "$grl" |
>         while read rev parents; do
>                 revcount=$(($revcount + 1))
> -               say -n "$revcount/$revmax ($createcount)
> "
> +               if [ -z "$quiet" ]; then
> +                       printf "%s" "$revcount/$revmax ($createcount)
> " >&2
> +               fi

Reviewers might wish to know that "say" in git-subtree is defined as

        say()
        {
                if [ -z "$quiet" ]; then
                        echo "$@" >&2
               fi
        }

Hence the "if" and the redirect.

-- 
Cheers,
Ray Chuan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]