Run "git fetch" with an explicit depth
CE is cloned with a specific depth (20 at the moment). When running "git fetch" without a depth, this could cause Git to try and walk over commits that are not in the CE repository. In response to this, Git produces a fatal error.
To work around this, we read the value of GIT_DEPTH to determine the fetch depth. If no value is specified, we default to 20.