Jiang Xin <worldhello....@gmail.com> writes:

> Junio C Hamano <gits...@pobox.com> 于2019年1月11日周五 上午5:11写道:
>>
>> Jiang Xin <worldhello....@gmail.com> writes:
>>
>> > From: Jiang Xin <zhiyou...@alibaba-inc.com>
>> > +create_commits()
>> > +{
>>
>> Style (see Documentation/CodingGuidelines).
>
> OK, parenthese after function name.
>>
>> > +create_pack_1()
>> > +{
>> > +     P1=$(cd .git/objects/pack; printf "$T\n$A\n$B\n$C\n$D\n$E\n$F\n$R\n" 
>> > | git pack-objects pack 2>/dev/null) &&
>>
>> Yikes.  Can't "git pack-objects" get the input directly without
>> overlong printf, something along the lines of...
>>
>>         P1=$(git -C .git/objects/pack pack-objects pack <<-EOF
>>                 $A
>>                 $B
>>                 $C
>>                 ...
>>                 $R
>>                 EOF
>>         )
>
> Find that no space before <OID>,  because git-pack-objects not allow that,
> and mached parentheses should in the same line.
> So Will write like this:
>
>     create_pack_1() {
>             P1=$(git -C .git/objects/pack pack-objects pack <<-EOF) &&
>     $T

Isn't the whole point of <<-EOF (notice the leading dash) to allow
us to indent the here-doc with horizontal tab?

Reply via email to