t3508: add check_head_differs_from() helper function and use it
t3508: add check_head_differs_from() helper function and use it

In a test like:

test "$(git rev-parse --verify HEAD)" != "$(git rev-parse --verify fourth)"

the --verify does not accomplish much, since the exit status of
git rev-parse is not propagated to test. So it is more robust to
define and use the helper functions check_head_differs_from() and
check_head_equals() as done by this patch.

Suggested-by: Jonathan Nieder <b57189c5f2fd5b3daf3350a77fde90def1080fa5@gmail.com>
Signed-off-by: Christian Couder <ddbaab5867ed34fd53535b58c9cdd59abd2e2aff@tuxfamily.org>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git