summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 589e4f9)
raw | patch | inline | side by side (parent: 589e4f9)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 19 Feb 2006 04:51:26 +0000 (20:51 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 22 Feb 2006 21:14:57 +0000 (13:14 -0800) |
"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>
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>
git-am.sh | patch | blob | history | |
git-applymbox.sh | patch | blob | history | |
git-merge.sh | patch | blob | history | |
git-resolve.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 98b9215f700b5cb6a01e39f0f0f0100dcb6e395e..85ecada657d21aba4b54034dbaf869f8387d7d02 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
#!/bin/sh
#
-#
+# Copyright (c) 2005, 2006 Junio C Hamano
USAGE='[--signoff] [--dotest=<dir>] [--utf8] [--binary] [--3way] <mbox>
or, when resuming [--skip | --resolved]'
. git-sh-setup
+git var GIT_COMMITTER_IDENT >/dev/null || exit
+
stop_here () {
echo "$1" >"$dotest/next"
exit 1
diff --git a/git-applymbox.sh b/git-applymbox.sh
index 61c8c024c60935b4766b5052461b4c73918a69ec..5569fdcc3463b214411d5a168a00783b0d390044 100755 (executable)
--- a/git-applymbox.sh
+++ b/git-applymbox.sh
USAGE='[-u] [-k] [-q] [-m] (-c .dotest/<num> | mbox) [signoff]'
. git-sh-setup
+git var GIT_COMMITTER_IDENT >/dev/null || exit
+
keep_subject= query_apply= continue= utf8= resume=t
while case "$#" in 0) break ;; esac
do
diff --git a/git-merge.sh b/git-merge.sh
index 74f07610fa2042ef0f2cb12c051d3be9139a680b..2b4a603dffb5d82cf6fd7cf0ac83ae4cdad703de 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
1,*,)
# We are not doing octopus, not fast forward, and have only
# one common. See if it is really trivial.
+ git var GIT_COMMITTER_IDENT >/dev/null || exit
+
echo "Trying really trivial in-index merge..."
git-update-index --refresh 2>/dev/null
if git-read-tree --trivial -m -u $common $head "$1" &&
;;
esac
+# We are going to make a new commit.
+git var GIT_COMMITTER_IDENT >/dev/null || exit
+
case "$use_strategies" in
'')
case "$#" in
diff --git a/git-resolve.sh b/git-resolve.sh
index 926307005493b7c8c4253b1adff34bdb4bc57b77..b53ede8d87b7473fb5b5239228008be372797552 100755 (executable)
--- a/git-resolve.sh
+++ b/git-resolve.sh
;;
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='
'