• Slavica Djukic's avatar
    stash: tolerate missing user identity · 3bc2111f
    Slavica Djukic authored
    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: default avatarJunio C Hamano <gitster@pobox.com>
    Signed-off-by: default avatarSlavica Djukic <slawica92@hotmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    3bc2111f
git-stash.sh 15.6 KB