Re: [PATCH 1/3] [Outreachy] t3903-stash: test without configured user name

2 messages, 2 authors, 2018-10-24 · open the first message on its own page

Re: [PATCH 1/3] [Outreachy] t3903-stash: test without configured user name

From: Junio C Hamano <hidden>
Date: 2018-10-24 02:48:13

Slavica [off-list ref] writes:
+test_expect_failure 'stash with HOME as non-existing directory' '
+    test_commit 1 &&
+    test_config user.useconfigonly true &&
+    test_config stash.usebuiltin true &&
+    (
+        HOME=$(pwd)/none &&
+        export HOME &&
What is the reason why this test needs to move HOME away from
TRASH_DIRECTORY (set in t/test-lib.sh)?
+        unset GIT_AUTHOR_NAME &&
+        unset GIT_AUTHOR_EMAIL &&
+        unset GIT_COMMITTER_NAME &&
+        unset GIT_COMMITTER_EMAIL &&
+        test_must_fail git config user.email &&
+        echo changed >1.t &&
+		git stash
+    )
+'
+
 test_done

Re: [PATCH 1/3] [Outreachy] t3903-stash: test without configured user name

From: Johannes Schindelin <hidden>
Date: 2018-10-24 07:39:15

Hi Junio,

On Wed, 24 Oct 2018, Junio C Hamano wrote:
Slavica [off-list ref] writes:
quoted
+test_expect_failure 'stash with HOME as non-existing directory' '
+    test_commit 1 &&
+    test_config user.useconfigonly true &&
+    test_config stash.usebuiltin true &&
+    (
+        HOME=$(pwd)/none &&
+        export HOME &&
What is the reason why this test needs to move HOME away from
TRASH_DIRECTORY (set in t/test-lib.sh)?
This is to make sure that no user.name nor user.email is configured. That
was my idea, hence I answer your question.

Ciao,
Dscho
quoted
+        unset GIT_AUTHOR_NAME &&
+        unset GIT_AUTHOR_EMAIL &&
+        unset GIT_COMMITTER_NAME &&
+        unset GIT_COMMITTER_EMAIL &&
+        test_must_fail git config user.email &&
+        echo changed >1.t &&
+		git stash
+    )
+'
+
 test_done
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help