git create stash without need to configure user.email and user.name (git stash --author ?)

With the git -c flag configuration parameters can be passed on the command line:

git -c user.name=test -c [email protected] stash create

With Git 2.21 (Q1 2019, 2+ years later), you won't have to configure user.email and user.name (git stash --author ?).

A properly configured username/email is required under user.useConfigOnly in order to create commits; now "git stash" (even though it creates commit objects to represent stash entries) command is exempt from the requirement.

See commit 3bc2111 (18 Nov 2018) by Slavica Djukic (``).
Helped-by: Junio C Hamano (gitster).
(Merged by Junio C Hamano -- gitster -- in commit 1328d29, 04 Jan 2019)

stash: tolerate missing user identity

The "git stash" command insists on having a usable user identity to the same degree as the "git commit-tree" and "git commit" commands do, because it uses the same codepath that creates commit objects as these commands.

It is not strictly necessary to do so.

Check if we will barf before creating commit objects and then supply fake identity to please the machinery that creates commits.
Add test to document that stash executes correctly both with and without valid ident.

This is not that much of usability improvement, as the users who run "git stash" would eventually want to record their changes that are temporarily stored in the stashes in a more permanent history by committing, and they must do "git config user.{name,email}" at that point anyway, so arguably this change is only delaying a step that is necessary to work in the repository.