From: Junio C Hamano <gitster@pobox.com>
To: "rae l" <crquan@gmail.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>,
git@vger.kernel.org, cr_quan@163.com,
"Scott James Remnant" <scott@ubuntu.com>
Subject: Re: [PATCH] gitview: revamped to use string.join, stripped a function def
Date: Tue, 20 Nov 2007 22:50:37 -0800 [thread overview]
Message-ID: <7vfxz0hz2a.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <91b13c310711202119j4f9e20f0n2515babe5f9217ac@mail.gmail.com> (rae l.'s message of "Wed, 21 Nov 2007 13:19:30 +0800")
"rae l" <crquan@gmail.com> writes:
> Please give some comments.
>
> On Sep 28, 2007 3:55 AM, Denis Cheng <crquan@gmail.com> wrote:
>> Signed-off-by: Denis Cheng <crquan@gmail.com>
Blast from the past ;-).
>> -def list_to_string(args, skip):
>> - count = len(args)
>> - i = skip
>> - str_arg=" "
>> - while (i < count ):
>> - str_arg = str_arg + args[i]
>> - str_arg = str_arg + " "
>> - i = i+1
>> -
>> - return str_arg
>> ...
>> """Fill in different windows with info from the reposiroty"""
>> - fp = os.popen("git rev-parse --sq --default HEAD " + list_to_string(args, 1))
>> + fp = os.popen("git rev-parse --sq --default HEAD " + " ".join(args[1:]))
Obviously correct, loses extra SPs on both ends of the args
string, and reads more Pythonic.
prev parent reply other threads:[~2007-11-21 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 19:55 [PATCH] gitview: revamped to use string.join, stripped a function def Denis Cheng
2007-11-21 5:19 ` rae l
2007-11-21 6:23 ` Vineet Kumar
2007-11-21 6:50 ` Junio C Hamano [this message]
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=7vfxz0hz2a.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=aneesh.kumar@gmail.com \
--cc=cr_quan@163.com \
--cc=crquan@gmail.com \
--cc=git@vger.kernel.org \
--cc=scott@ubuntu.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).