#!/bin/bash
# Used to include the commit hash in the build
if [ "$1" = "rev-parse" ]; then
  if [[ "$*" == *"--short"* ]]; then
    echo "51b4993cf9d8"
  else
    echo "51b4993cf9d823439984ed82caa7864f4208f70b"
  fi
  exit 0
fi

# If there are uncommitted files (checked with `git status --porcelain=v2`), the
# build system will append a `+` to the commit hash. So, report a clean tree.
if [ "$1" = "status" ]; then
  exit 0
fi

# Try to catch any other calls by making them fail
echo "fake-git: not implemented command $1"
exit 1
