diff options
author | Slavica Djukic <slavicadj.ip2018@gmail.com> | 2018-11-18 14:44:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-19 08:24:34 +0900 |
commit | 3bc2111fc2e9e8ff33b48bb2ccd17b77ca7dbced (patch) | |
tree | 2f737f78b996ce19ad3ce9e7f789e00a4ae45b68 /t/t4020-diff-external.sh | |
parent | Tenth batch for 2.20 (diff) | |
download | tgif-3bc2111fc2e9e8ff33b48bb2ccd17b77ca7dbced.tar.xz |
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 necesary 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.
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Slavica Djukic <slawica92@hotmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4020-diff-external.sh')
0 files changed, 0 insertions, 0 deletions