From: Junio C Hamano Date: Sun, 18 Nov 2018 06:28:34 GMT Subject: Re: [PATCH v2 1/2] [Outreachy] t3903-stash: test without configured user.name and user.email Message-ID: In-Reply-To: Slavica Djukic writes: >> Yes, but for that you'd need to be checking the resulting commit >> object that represents the stash entry. It should be created under >> the substitute identity. > Would it be correct to check it like this: > >         git reset && >         >1 && >         git add 1 && >         echo "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>" >expect && >         git stash && >         git show -s --format="%an <%ae>" refs/stash >actual && >         test_cmp expect actual So, you create a stash, and grab %an and %ae out of the resulting commit object and store them in actual, and then compare. Makes sense.