Skip to content

Commit ce6434b

Browse files
MishaKavclaude
andauthored
Optimize git clone performance by using shallow-since instead of full history (#432)
Replace --deepen=2147483647 with --shallow-since="6 months ago" to improve clone performance while maintaining sufficient commit history for gitStream analysis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 3b2ea0e commit ce6434b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,11 @@ runs:
126126
if: ${{ env.SHOULD_CHECKOUT == 'true' }}
127127
shell: bash
128128
run: |
129-
ALL=2147483647
130129
cd gitstream && cd repo
131130
git config checkout.defaultRemote origin
132-
git fetch --deepen=$ALL origin $'${{ steps.safe-strings.outputs.base_ref }}'
131+
git fetch --shallow-since="6 months ago" origin $'${{ steps.safe-strings.outputs.base_ref }}'
133132
git remote add upstream $'${{ steps.safe-strings.outputs.url }}'
134-
git fetch --deepen=$ALL upstream $'${{ steps.safe-strings.outputs.head_ref }}'
133+
git fetch --shallow-since="6 months ago" upstream $'${{ steps.safe-strings.outputs.head_ref }}'
135134
git checkout -b $'upstream/${{ steps.safe-strings.outputs.head_ref}}' $'upstream/${{ steps.safe-strings.outputs.head_ref}}'
136135
git checkout $'${{ steps.safe-strings.outputs.base_ref }}'
137136
git checkout $'${{ steps.safe-strings.outputs.head_ref }}'

0 commit comments

Comments
 (0)