Skip to content

Commit

Permalink
fix: use --depth on git fetch for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspin committed Apr 19, 2024
1 parent d13091f commit 9339563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcheckout
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function checkout::refbased() {
retry git clone --depth "${SEMAPHORE_GIT_DEPTH}" "${SEMAPHORE_GIT_URL}" "${SEMAPHORE_GIT_DIR}"
cd "${SEMAPHORE_GIT_DIR}" || exit

if ! retry git fetch origin +"${SEMAPHORE_GIT_REF}": 2>/dev/null; then
if ! retry git fetch --depth "${SEMAPHORE_GIT_DEPTH}" origin +"${SEMAPHORE_GIT_REF}": 2>/dev/null; then
echo "Revision: ${SEMAPHORE_GIT_SHA} not found .... Exiting"
return 1
else
Expand Down

0 comments on commit 9339563

Please sign in to comment.