[llvm] Increase git fetch depth (PR #70946)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 08:15:02 PDT 2023


https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/70946

We've gotten ~750 commits in the last 7 days. Upping the fetch depth to 2000 will make it more likely that PRs up to 2 weeks old will have enough fetch history to find a common parent. This _might_ address some of the failures we're seeing in the clang-format action where it cannot find a common base commit.

>From 8782309430690b6a571528c759eeaee983d5ec27 Mon Sep 17 00:00:00 2001
From: Chris Bieneman <chris.bieneman at me.com>
Date: Wed, 1 Nov 2023 10:12:10 -0500
Subject: [PATCH] Increase git fetch depth

We've gotten ~750 commits in the last 7 days. Upping the fetch depth to
2000 will make it more likely that PRs up to 2 weeks old will have
enough fetch history to find a common parent. This _might_ address some
of the failures we're seeing in the clang-format action where it cannot
find a common base commit.
---
 .github/workflows/pr-code-format.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 3a91ffb0b1ad9a7..5978d503f6f35d3 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -10,14 +10,14 @@ jobs:
       - name: Fetch LLVM sources
         uses: actions/checkout at v4
         with:
-          fetch-depth: 2
+          fetch-depth: 2000 # Fetches only the last 2000 commits
 
       - name: Get changed files
         id: changed-files
         uses: tj-actions/changed-files at v39
         with:
           separator: ","
-          fetch_depth: 100 # Fetches only the last 10 commits
+          fetch_depth: 2000 # Fetches only the last 2000 commits
 
       - name: "Listed files"
         run: |



More information about the llvm-commits mailing list