Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-19 07:51:26 +0300
committerJunio C Hamano <junkio@cox.net>2006-02-19 07:51:26 +0300
commite3b59a44f6705896db80965427a7cf9e2112634b (patch)
tree2f33e3f25bc606ff5e93560e0a8133ca4997218d /git-resolve.sh
parent749be728d469e9a0acfdc020feff17c2da510083 (diff)
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 <junkio@cox.net>
Diffstat (limited to 'git-resolve.sh')
-rwxr-xr-xgit-resolve.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-resolve.sh b/git-resolve.sh
index 9263070054..b53ede8d87 100755
--- a/git-resolve.sh
+++ b/git-resolve.sh
@@ -50,6 +50,9 @@ case "$common" in
;;
esac
+# We are going to make a new commit.
+git var GIT_COMMITTER_IDENT >/dev/null || exit
+
# Find an optimum merge base if there are more than one candidates.
LF='
'