t-duplicate-oids: use correct awk indexing

In awk, strings start at position 1, not position 0, according to POSIX.
While using 0 does the right thing for some awk versions, it fails with
the version of mawk in Debian unstable.  Since it's easy to invoke this
in a way that works for all awk versions, let's do so.
This commit is contained in:
brian m. carlson 2020-01-14 19:38:06 +00:00
parent 770719d44a
commit 4b8ee6950f
No known key found for this signature in database
GPG Key ID: 2D0C9BC12F82B3A1

@ -19,7 +19,7 @@ begin_test "multiple revs with same OID get pushed once"
# Stash the contents of the file that we want to commit in .git/lfs/objects.
object_dir="$(echo $contents_oid \
| awk '{ print substr($0, 0, 2) "/" substr($0, 3, 2) }')"
| awk '{ print substr($0, 1, 2) "/" substr($0, 3, 2) }')"
mkdir -p ".git/lfs/objects/$object_dir"
printf "%s" "$contents" > ".git/lfs/objects/$object_dir/$contents_oid"