From: Junio C Hamano Date: Fri, 11 Jan 2019 18:00:47 GMT Subject: Re: [PATCH v5 1/5] t5323: test cases for git-pack-redundant Message-ID: In-Reply-To: Jiang Xin writes: > Junio C Hamano 于2019年1月11日周五 上午5:11写道: >> >> Jiang Xin writes: >> >> > From: Jiang Xin >> > +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 , 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?