From c0a248856e1d06666e4ba8035776a70bbc96eb5f Mon Sep 17 00:00:00 2001
From: Quentin Duchemin <quentinduchemin@tuta.io>
Date: Tue, 27 Oct 2020 16:23:41 +0100
Subject: [PATCH] [docker_test] Don't reset hard all, just checkout the folder
 being tested

---
 docker_test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docker_test.sh b/docker_test.sh
index c4b72d6a..027ccc11 100755
--- a/docker_test.sh
+++ b/docker_test.sh
@@ -53,13 +53,13 @@ else
   echo "WARNING : directory does not exist ($1) ; will try to pull"
 fi
 
-echo -e "\n==== RESET HARD and pull Dockerfiles repository ===="
+echo -e "\n==== Pull Dockerfiles repository ===="
 echo -e "Using branch \033[31m $(git rev-parse --abbrev-ref HEAD)\e[0m, is this correct ? [y/N]"
 read ans
 
 if [ $ans == "y" ]; then
-  git reset --hard
   git pull
+  git restore --source=HEAD --staged --worktree -- $1
 else
   echo "Aborting."
   exit 0
-- 
GitLab