From b51c2ffbe1e3adb14470a97761ec94a441db9ccf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20-=20Le=20Filament?= <theo@le-filament.com>
Date: Tue, 17 Sep 2024 18:41:27 +0200
Subject: [PATCH] build: remove git clone with filter because it is not
 implemented

---
 get_addons | 30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git a/get_addons b/get_addons
index 581a1a7..c2345d0 100644
--- a/get_addons
+++ b/get_addons
@@ -1,7 +1,5 @@
 #!/bin/sh
 
-# set -e
-
 ODOO_ROOT_DIR=${ODOO_ROOT_DIR:-'/opt/odoo'}
 SAVE_COMMITS_DIR=${SAVE_COMMITS_DIR:-'/opt/odoo_commits'}
 SAVE_COMMITS_FILENAME=${SAVE_COMMITS_FILENAME:-'custom_addons'}
@@ -92,41 +90,23 @@ shift
 modules="$@"
 
 # Clonning repo.
-# set +e
-log_action="repo '$repo': clonning [no tree + branch]..."
+log_action="repo '$repo': clonning [branch]..."
 print_info "$log_action"
-git clone --branch "${ref}" --filter=tree:0 "${repo}" "${TMP_REPO_PATH}"
+git clone --single-branch --branch "${ref}" --depth 1 "${repo}" "${TMP_REPO_PATH}"
 if [ "$?" -eq 0 ]; then
   print_success "$log_action"
 else
   print_failed "$log_action"
-  log_action="repo '$repo': clonning [no tree]..."
+  log_action="repo '$repo': clonning [classic]..."
   print_info "$log_action"
-  git clone --filter=tree:0 "${repo}" "${TMP_REPO_PATH}"
+  git clone "${repo}" "${TMP_REPO_PATH}"
   if [ "$?" -eq 0 ]; then
     print_success "$log_action"
   else
     print_failed "$log_action"
-    log_action="repo '$repo': clonning [branch]..."
-    print_info "$log_action"
-    git clone --single-branch --branch "${ref}" --depth 1 "${repo}" "${TMP_REPO_PATH}"
-    if [ "$?" -eq 0 ]; then
-      print_success "$log_action"
-    else
-      print_failed "$log_action"
-      log_action="repo '$repo': clonning [classic]..."
-      print_info "$log_action"
-      git clone "${repo}" "${TMP_REPO_PATH}"
-      if [ "$?" -eq 0 ]; then
-        print_success "$log_action"
-      else
-        print_failed "$log_action"
-        print_err "unable to clone repo '$repo'" 1
-      fi
-    fi
+    print_err "unable to clone repo '$repo'" 1
   fi
 fi
-# set -e
 
 ## Get module code and save informations about it in a CSV file.
 
-- 
GitLab