Re: [PATCH] status&commit: Teach them to show submodule commit summary

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

 



On Nov 12, 2007 10:46 PM, Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> 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
-
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]

  Powered by Linux