Re: [PATCH v2 06/24] multi-pack-index: load into memory
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jul 5, 2018, 18:58 UTC
- Message-ID
- <CAPig+cTVD5OpVnxAqQnO_CkzFRRkZ3YWsRC4ZwUmAELSZzcDKw@mail.gmail.com>
- In-Reply-To
- <2bb2a12f-f22d-990b-636c-73b2b805d12d@gmail.com>
On Thu, Jul 5, 2018 at 10:20 AM Derrick Stolee <stolee@gmail.com> wrote:
Show 19 quoted lines
> On 6/25/2018 3:38 PM, Junio C Hamano wrote:
> While I don't use substitutions in this patch, I do use them in later
> patches. Here is the final version of this method:
>
> midx_read_expect () {
> NUM_PACKS=$1
> NUM_OBJECTS=$2
> NUM_CHUNKS=$3
> EXTRA_CHUNKS="$5"
> cat >expect <<-\EOF
> header: 4d494458 1 $NUM_CHUNKS $NUM_PACKS
> chunks: pack_names oid_fanout oid_lookup
> object_offsets$EXTRA_CHUNKS
> num_objects: $NUM_OBJECTS
> packs:
> EOF
>
> Using <<-\EOF causes these substitutions to fail. Is there a different
> way I should construct this method?When you need to interpolate variables into the here-doc, use <<-EOF; when you don't, use <<-\EOF.