#!/usr/bin/bash

# DESCRIPTION:
#
# Get git top-level directory path. You can optionally pass path that git should use as a working directory during top-level determination.
#
# env: PWD

cd "${1-$PWD}"

/usr/bin/git rev-parse --show-toplevel
