[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: Fwd: [PATCH] git-subtree: Avoid using echo -n even indirectly
From:       Johannes Sixt <j.sixt () viscovery ! net>
Date:       2013-10-09 10:46:47
Message-ID: 52553417.2090903 () viscovery ! net
[Download RAW message or body]

Am 10/9/2013 12:32, schrieb Paolo Giarrusso:
> On Wed, Oct 9, 2013 at 12:20 PM, Tay Ray Chuan <rctay89@gmail.com> wrote:
>> On Wed, Oct 9, 2013 at 11:57 AM, Paolo G. Giarrusso
>> <p.giarrusso@gmail.com> 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
> 
> An additional note for reviewers and appliers: the original and the
> patched codeboth embed a literal ^M,
>...
> whether the code should use some
> escape sequence instead.

As you are using printf, you can easily do:

			printf '%s\r' "..."

without using ^M.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic