From: Sean <seanlkml@sympatico.ca>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Ensure author & committer before asking for commit message.
Date: Sat, 13 May 2006 23:09:32 -0400 [thread overview]
Message-ID: <BAYC1-PASMTP06C5870DB0764F7F3284A3AEA20@CEZ.ICE> (raw)
Message-ID: <20060513230932.41ef4982.seanlkml@sympatico.ca> (raw)
In-Reply-To: <7vlkt5s4yw.fsf@assigned-by-dhcp.cox.net>
It's better to find out you need to fix your author and
committer information before you enter a long commit message.
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
---
On Sat, 13 May 2006 19:41:27 -0700
Junio C Hamano <junkio@cox.net> wrote:
> Makes sense but I suspect you would want COMMITTER not AUTHOR.
> Imagine you pulled from somewhere else and it conflicted,
> requiring you to hand resolve and then run git-commit.
Hmm.. It seems that both sets of environment variables must be
properly set before commit will succeed? For some reason I thought
that if AUTHOR was properly set it would be used as the committer too
when the GIT_COMMITTER_* environment variables weren't set. All I
ever use are the config user.email/name variables which do work for
both author and committer.
But it looks like we have to test both variables before proceeding.
git-commit.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
801ac3c2e4ec7fd0dd91975800897f30938b4e68
diff --git a/git-commit.sh b/git-commit.sh
index 26cd7ca..6ef1a9d 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -640,6 +640,8 @@ case "$no_edit" in
exit 1
;;
esac
+ git-var GIT_AUTHOR_IDENT > /dev/null || die
+ git-var GIT_COMMITTER_IDENT > /dev/null || die
${VISUAL:-${EDITOR:-vi}} "$GIT_DIR/COMMIT_EDITMSG"
;;
esac
--
1.3.2.gd9a4
prev parent reply other threads:[~2006-05-14 3:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060513215115.5bbae2ab.seanlkml@sympatico.ca>
2006-05-14 1:51 ` [PATCH] Ensure author information is set before asking for commit message Sean
2006-05-14 2:41 ` Junio C Hamano
[not found] ` <20060513230932.41ef4982.seanlkml@sympatico.ca>
2006-05-14 3:09 ` Sean [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAYC1-PASMTP06C5870DB0764F7F3284A3AEA20@CEZ.ICE \
--to=seanlkml@sympatico.ca \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox