git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Kacper Kornet <draenog@pld-linux.org>,
	git@vger.kernel.org, Lucian Poston <lucian.poston@gmail.com>
Subject: Re: [PATCH] test: skip test with COLUMNS=1 under mksh
Date: Sat, 28 Apr 2012 13:09:13 +0200	[thread overview]
Message-ID: <4F9BCFD9.8020005@in.waw.pl> (raw)
In-Reply-To: <4F9B1F38.8040406@gmail.com>

On 04/28/2012 12:35 AM, Stefano Lattarini wrote:
> Hi Junio, Zbigniew.
> 
> On 04/27/2012 06:21 PM, Junio C Hamano wrote:
>> Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> writes:
>>
>>> mksh does not allow $COLUMNS to be set below 12. Quoting mksh(1)
>>> $COLUMNS is "always set, defaults to 80, unless the value as reported
>>> by stty(1) is non-zero and sane enough". This applies also to setting
>>> it directly for one command:
>>>
>>> $ COLUMNS=30 python -c 'import os; print os.environ["COLUMNS"]'
>>> 30
>>> $ COLUMNS=20 python -c 'import os; print os.environ["COLUMNS"]'
>>> 20
>>> $ COLUMNS=10 python -c 'import os; print os.environ["COLUMNS"]'
>>> 98
>>
>> I wonder if this is an easier workaround, though.
>>
>> 	env COLUMNS=10 $cmd
>>
> It works for me:
> 
>   $ mksh -c 'COLUMNS=10 env | grep COLUMNS'
>   COLUMNS=113
> 
>   $ mksh -c 'env COLUMNS=10 env | grep COLUMNS'
>   COLUMNS=10
> 
>   $ dpkg -l mksh
>   ...
>   ii  mksh  40.2-2  MirBSD Korn Shell
> 
> HTH,
>   Stefano
> 
This approach with 'env COLUMNS=1 git ...' looks nicer, and works when
invoked directly, but doesn't work when run under the test harness,
because bin-wrappers/git uses !/bin/sh, which resets COLUMNS. So this
simpler approach doesn't look feasible.

Zbyszek

  reply	other threads:[~2012-04-29 17:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-18  2:29 [PATCH v4 1/4] t4052: test --stat output with --graph Lucian Poston
2012-04-18  2:29 ` [PATCH v4 2/4] Adjust stat width calculations to take --graph output into account Lucian Poston
2012-04-18  2:29 ` [PATCH v4 3/4] t4052: Test diff-stat output with minimum columns Lucian Poston
2012-04-18 20:15   ` Junio C Hamano
2012-04-18 21:19     ` Lucian Poston
2012-04-18 21:09   ` Lucian Poston
2012-04-26 22:34     ` Kacper Kornet
2012-04-27  9:25       ` [PATCH] test: skip test with COLUMNS=1 under mksh Zbigniew Jędrzejewski-Szmek
2012-04-27 16:08         ` Junio C Hamano
2012-04-28 11:09           ` Zbigniew Jędrzejewski-Szmek
2012-04-27 16:21         ` Junio C Hamano
2012-04-27 22:35           ` Stefano Lattarini
2012-04-28 11:09             ` Zbigniew Jędrzejewski-Szmek [this message]
2012-04-29 21:28               ` Junio C Hamano
2012-04-18  2:29 ` [PATCH v4 4/4] Prevent graph_width of stat width from falling below min Lucian Poston
2012-04-18 21:12   ` Lucian Poston
2012-04-18  8:47 ` [PATCH v4 1/4] t4052: test --stat output with --graph Zbigniew Jędrzejewski-Szmek

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=4F9BCFD9.8020005@in.waw.pl \
    --to=zbyszek@in.waw.pl \
    --cc=draenog@pld-linux.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lucian.poston@gmail.com \
    --cc=stefano.lattarini@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).