From: Pat Notz <patnotz@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: git@vger.kernel.org
Subject: Re: git commit -C vs. prepare-commit-msg hook
Date: Tue, 2 Nov 2010 14:11:33 -0600 [thread overview]
Message-ID: <AANLkTimdjAc1ZKNkWAO_KU8CqorShMv0TNDvsy5qmSDw@mail.gmail.com> (raw)
In-Reply-To: <20101102145059.GB2116@neumann>
2010/11/2 SZEDER Gábor <szeder@ira.uka.de>:
> Hi,
>
> Just noticed (read: got bitten by ;) that 'git commit' runs the
> prepare-commit-msg hook even if it was invoked with the -C option.
> This seems contradictory to me, because 'git commit -C' is to reuse an
> already existing log message (and author info) as is, whereas
> prepare-commit-msg is there to automatically edit the commit message.
>
Can your hook look for the presence of the third command line argument
to catch this case? Granted, you won't be able to tell the difference
between -C and -c or --amend.
> Is this desired and I'm missing something, or is this a bug? (or just
> accidental, but we can't do anything about it anyway because of
> backward compatibility?)
>
> Thanks.
>
>
> Best,
> Gábor
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2010-11-02 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-02 14:50 git commit -C vs. prepare-commit-msg hook SZEDER Gábor
2010-11-02 20:11 ` Pat Notz [this message]
2010-11-02 23:01 ` SZEDER Gábor
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=AANLkTimdjAc1ZKNkWAO_KU8CqorShMv0TNDvsy5qmSDw@mail.gmail.com \
--to=patnotz@gmail.com \
--cc=git@vger.kernel.org \
--cc=szeder@ira.uka.de \
/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;
as well as URLs for NNTP newsgroup(s).