Re: [PATCH v5 1/5] t5323: test cases for git-pack-redundant
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 11, 2019, 18:00 UTC
- Message-ID
- <xmqq8szrysz4.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CANYiYbFxCYSt0yQtt5xsFSshVCDuVU58hWBA6AF2e+QzmdUViQ@mail.gmail.com>
Jiang Xin <worldhello.net@gmail.com> writes:
Show 35 quoted lines
> Junio C Hamano <gitster@pobox.com> 于2019年1月11日周五 上午5:11写道:
>>
>> Jiang Xin <worldhello.net@gmail.com> writes:
>>
>> > From: Jiang Xin <zhiyou.jx@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) &&
> $TIsn't the whole point of <<-EOF (notice the leading dash) to allow us to indent the here-doc with horizontal tab?