t8300: compensate for Git sha256 patch-id behavior
The help for `git patch-id` says:
Read a patch from the standard input and compute the patch ID for it.
A "patch ID" is nothing but a sum of SHA-1 of the file diffs associated
[...]
It neglects to mention anything about SHA2 sha256 or anything about the
output being affected by whether or not the current directory is a valid
`git rev-parse --git-dir` or not.
And yet, if the current directory is a valid `git rev-parse --git-dir`
directory AND it happens to be using sha256 instead of sha1, then the
output of `git patch-id` will be using sha256 instead of sha1.
There's, of course, nothing about this in the help for `git patch-id`
at all -- it continues to reference SHA-1.
However, simply setting the git directory (using GIT_DIR, --git-dir or -C),
addresses the problem.
A very simple fix for a non-obvious issue which is, fortunately,
future-proof if the `git patch-id` behavior ends up getting changed.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>