From 958d453c5dd1aafb07e10aed3287a11e807548c9 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 4 Nov 2022 14:43:22 -0600 Subject: [PATCH] Update diff-sha.sh --- diff-sha.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diff-sha.sh b/diff-sha.sh index f2bd7687..8dd0200c 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -178,10 +178,10 @@ else while ! git merge-base "$TARGET_BRANCH" "$CURRENT_BRANCH" > /dev/null; do depth=$((depth+1024)) - if [[ -d .git/shallow ]]; then - git fetch -q --deepth=$depth --unshallow origin "$CURRENT_BRANCH":"$CURRENT_BRANCH" + if [[ -f .git/shallow ]]; then + git fetch -q --deepen=$depth origin "$CURRENT_BRANCH":"$CURRENT_BRANCH" else - git fetch -q --deepth=$depth origin "$CURRENT_BRANCH":"$CURRENT_BRANCH" + git fetch -q --depth=$depth origin "$CURRENT_BRANCH":"$CURRENT_BRANCH" fi if [[ $depth -gt 5000 ]]; then