]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
ident: add the ability to provide a "fallback identity"
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 25 Feb 2019 23:16:08 +0000 (23:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Feb 2019 23:03:46 +0000 (08:03 +0900)
commitfd5a58477c62ddb6ec16cf7b5b2da7597f0fa398
treea51b098ad598800dd438e521ee1a8b7eb832a220
parent5ef264dbdbc48b44ad5fc37e7542f3dc70e3e8c5
ident: add the ability to provide a "fallback identity"

In 3bc2111fc2e9 (stash: tolerate missing user identity, 2018-11-18),
`git stash` learned to provide a fallback identity for the case that no
proper name/email was given (and `git stash` does not really care about
a correct identity anyway, but it does want to create a commit object).

In preparation for the same functionality in the upcoming built-in
version of `git stash`, let's offer the same functionality as an API
function.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
[tg: add docs; make it a bug to call the function before other
functions in the ident API]
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
ident.c