From c85ec1f9fb68744497cc79c75fa4fae524824a78 Mon Sep 17 00:00:00 2001
From: Sebastain Gerhardt <oss@bittracker.org>
Date: Thu, 15 Feb 2018 00:26:07 +0100
Subject: [PATCH] Fixes #144 - Blank Git user config for tests

removed the '--no-gpg-sign' from PR #141 and overrites the HOME variable to
force git using an empty config.

see changes in:
 * tests/repos/scripts/dont-render
 * tests/repos/scripts/no-newline-at-end-of-file
 * tests/repos/scripts/test_repo
---
 tests/repos/scripts/dont-render               |  7 ++++++-
 tests/repos/scripts/no-newline-at-end-of-file |  9 +++++++--
 tests/repos/scripts/test_repo                 | 11 ++++++++---
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/tests/repos/scripts/dont-render b/tests/repos/scripts/dont-render
index a203e4c..9870005 100755
--- a/tests/repos/scripts/dont-render
+++ b/tests/repos/scripts/dont-render
@@ -1,4 +1,9 @@
 #!/bin/bash -e
+
+# This should prevent this script to load the local git user config: 
+# (HOME overwrite)
+HOME="."
+
 git init
 
 # Create binary
@@ -13,4 +18,4 @@ git add image.jpg
 yes | head -n 102400 > toolarge
 git add toolarge
 
-git commit --no-gpg-sign -am first
+git commit -am first
diff --git a/tests/repos/scripts/no-newline-at-end-of-file b/tests/repos/scripts/no-newline-at-end-of-file
index 99793ae..4ef6715 100755
--- a/tests/repos/scripts/no-newline-at-end-of-file
+++ b/tests/repos/scripts/no-newline-at-end-of-file
@@ -1,12 +1,17 @@
 #!/bin/bash -e
+
+# This should prevent this script to load the local git user config: 
+# (HOME overwrite)
+HOME="."
+
 git init
 
 echo 1 > test
 echo -n 2 >> test
 git add test
-git commit --no-gpg-sign -m old
+git commit -m old
 
 echo 1 > test
 echo 2 >> test
 git add test
-git commit --no-gpg-sign -m new
+git commit -m new
diff --git a/tests/repos/scripts/test_repo b/tests/repos/scripts/test_repo
index 454896c..b0f50a6 100755
--- a/tests/repos/scripts/test_repo
+++ b/tests/repos/scripts/test_repo
@@ -1,13 +1,18 @@
 #!/bin/bash -e
+
+# This should prevent this script to load the local git user config: 
+# (HOME overwrite)
+HOME="."
+
 git init
 
 echo "int a;" > test.c
 echo "function test() {}" > test.js
 git add test.c
 git add test.js
-git commit --no-gpg-sign -m "Add some code"
+git commit -m "Add some code"
 
-git commit --no-gpg-sign --allow-empty -m "Empty commit 1"
+git commit --allow-empty -m "Empty commit 1"
 git tag tag1
 
-git commit --no-gpg-sign --allow-empty -m "Empty commit 2"
+git commit --allow-empty -m "Empty commit 2"
-- 
GitLab