From d64e6b04291e2313343866a6b206caf13313f1f9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 18 Feb 2006 20:51:26 -0800 Subject: Keep Porcelainish from failing by broken ident after making changes. "empty ident not allowed" error makes commit-tree fail, so we are already safer in that we would not end up with commit objects that have bogus names on the author or committer fields. However, before commit-tree is called there are already changes made to the index file and the working tree. The operation can be resumed after fixing the environment problem, but when this triggers to a newcomer with unusable gecos, the first question becomes "what did I lose and how would I recover". This patch modifies some Porcelainish commands to verify GIT_COMMITTER_IDENT as soon as we know we are going to make some commits before doing much damage to prevent confusion. Signed-off-by: Junio C Hamano --- git-am.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index 98b9215f70..85ecada657 100755 --- a/git-am.sh +++ b/git-am.sh @@ -1,11 +1,13 @@ #!/bin/sh # -# +# Copyright (c) 2005, 2006 Junio C Hamano USAGE='[--signoff] [--dotest=] [--utf8] [--binary] [--3way] or, when resuming [--skip | --resolved]' . git-sh-setup +git var GIT_COMMITTER_IDENT >/dev/null || exit + stop_here () { echo "$1" >"$dotest/next" exit 1 -- cgit v1.2.3