]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib-functions.sh
t: move 'hex2oct' into test-lib-functions.sh
authorTaylor Blau <me@ttaylorr.com>
Fri, 5 Apr 2019 03:37:42 +0000 (20:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Apr 2019 06:06:04 +0000 (15:06 +0900)
commit5c07647d987d7f74f11ffadd39343c2f1540176c
tree354e4bb19f8a9450c89b27e09c2b1987c58e1d98
parentaeb582a98374c094361cba1bd756dc6307432c42
t: move 'hex2oct' into test-lib-functions.sh

The helper 'hex2oct' is used to convert base-16 encoded data into a
base-8 binary form, and is useful for preparing data for commands that
accept input in a binary format, such as 'git hash-object', via
'printf'.

This helper is defined identically in three separate places throughout
't'. Move the definition to test-lib-function.sh, so that it can be used
in new test suites, and its definition is not redundant.

This will likewise make our job easier in the subsequent commit, which
also uses 'hex2oct'.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1007-hash-object.sh
t/t1450-fsck.sh
t/t5601-clone.sh
t/test-lib-functions.sh