Re: [PATCH 3/4] test-lib-functions: add helper for trailing hash
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 7, 2022, 22:27 UTC
- Message-ID
- <221207.86zgby97bk.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <a20bf8de8645c19a02838d70a7c2c3b00378a50d.1670433958.git.gitgitgadget@gmail.com>
On Wed, Dec 07 2022, Derrick Stolee via GitGitGadget wrote:
Show 7 quoted lines
> From: Derrick Stolee <derrickstolee@github.com>
> [...]
> +# Given a filename, extract its trailing hash as a hex string
> +test_trailing_hash () {
> + local file="$1" &&
> + tail -c $(test_oid rawsz) "$file" | \
> + test-tool hexdump | \You don't need the "\"'s here.
> + sed "s/ //g" > +}
At the end of this series we have one test file using this test_trailing_hash, can't we just add it to t1600-index.sh?