From: "Ping Yin" <pkufranky@gmail.com>
To: "Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>,
"Ping Yin" <pkufranky@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] status&commit: Teach them to show submodule commit summary
Date: Mon, 12 Nov 2007 23:17:48 +0800 [thread overview]
Message-ID: <46dff0320711120717gf8a67cdn2b6bdaa9cfa29218@mail.gmail.com> (raw)
In-Reply-To: <20071112144605.GA16791@ins.uni-bonn.de>
On Nov 12, 2007 10:46 PM, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> Hello,
>
> A couple of portability nits:
>
> * Ping Yin wrote on Mon, Nov 12, 2007 at 03:21:17PM CET:
> [...]
> > +
> > + # TODO: quote module names containing space or tab
> > + test -n "$modules" && echo -e "# Submodules modifiled: "$modules"\n#"
>
> Typo: s/modifiled/modified/
Oops
>
> Then, "echo -e" is not portable (and not used elsewhere in git), but you
> can just use this instead:
> test ... && { echo "# ..."; echo "#"; }
See
>
> Also, it so happens you leave $modules outside quotes which will drop
> multiple adjacent white spaces. Did you mean to use
> echo "# Submodules modified: \"$modules\""
I leave $modules outside quotes to let "\n" change to <space> by auto
word splitting.
It actually eats white spaces in the module names. So any suggestion
to handle this case?
To handles module names with spaces, is it ok to display as follows?
Submodules modified: sm1 "sm name with space"
Any good way to only add quoting for names with spaces?
> You can instead just use a literal newline:
> IFS='
> '
> (minus the indentation). And add a literal carriage return if need be
> (is that really needed on Mac OS?), though you may want to enclose that
> in another pair of quotes to avoid it being "optimized" away by some
> editor.
I just guess '\r' is need for Mac OS because i havn't Mac OS environment.
BTW, how to add a literal carriage return?
>
> Cheers,
> Ralf
>
--
Ping Yin
next prev parent reply other threads:[~2007-11-12 15:18 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 19:27 [PATCH] status&commit: Teach them to show commits of modified submodules Ping Yin
2007-11-10 19:55 ` Sven Verdoolaege
2007-11-10 20:00 ` Sven Verdoolaege
2007-11-11 5:30 ` Yin Ping
2007-11-10 21:14 ` Junio C Hamano
2007-11-11 6:18 ` Yin Ping
2007-11-11 20:34 ` Junio C Hamano
2007-11-12 5:38 ` Ping Yin
2007-11-12 7:26 ` Johannes Sixt
2007-11-12 9:51 ` Johannes Schindelin
2007-11-12 22:39 ` Junio C Hamano
2007-11-12 8:40 ` Johan Herland
2007-11-12 10:03 ` Johannes Sixt
2007-11-12 14:21 ` [PATCH] status&commit: Teach them to show submodule commit summary Ping Yin
2007-11-12 14:46 ` Ralf Wildenhues
2007-11-12 15:17 ` Ping Yin [this message]
2007-11-12 16:53 ` Brian Gernhardt
2007-11-12 15:37 ` Jakub Narebski
2007-11-12 15:46 ` Ping Yin
2007-11-12 15:59 ` Johannes Sixt
2007-11-12 16:12 ` Jakub Narebski
2007-11-12 16:42 ` Ping Yin
2007-11-12 16:13 ` Johannes Schindelin
2007-11-12 16:39 ` Ping Yin
2007-11-12 16:51 ` Johannes Sixt
2007-11-12 16:35 ` Ping Yin
2007-11-12 16:45 ` Johannes Sixt
2007-11-12 17:47 ` Lars Hjemli
2007-11-15 16:49 ` Ping Yin
2007-11-11 0:07 ` [PATCH] status&commit: Teach them to show commits of modified submodules Lars Hjemli
2007-11-11 6:24 ` Yin Ping
2007-11-11 8:27 ` Lars Hjemli
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=46dff0320711120717gf8a67cdn2b6bdaa9cfa29218@mail.gmail.com \
--to=pkufranky@gmail.com \
--cc=Ralf.Wildenhues@gmx.de \
--cc=git@vger.kernel.org \
/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).