From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Conrad Irwin <conrad.irwin@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH] Add support for -p/--patch to git-commit
Date: Sun, 26 Dec 2010 17:30:21 +0100 [thread overview]
Message-ID: <vpqr5d4cx9e.fsf@bauges.imag.fr> (raw)
In-Reply-To: <E1PWsuV-0000FH-90@scarlatti.dunvegan.biz> (Conrad Irwin's message of "Sun\, 26 Dec 2010 15\:36\:34 +0000")
Conrad Irwin <conrad.irwin@gmail.com> writes:
> Hello Git,
>
> Please let me know of any mistakes I've made, this is a first for
> me.
At least one mistake:
To: unlisted-recipients:; (no To-header on input)
(I guess you've Bcc-ed the Git list, please don't do that)
> While this patch works as advertised, I wonder if it would be nicer to
> change the behaviour of git commit --interactive and git commit -p to
> act on a temporary copy of the index rather than mutating the existing
> index. I've no idea how to go about that yet, but is it something that
> should be changed?
I don't think so. After a commit, I usually expect the index to be
clean, ready to start preparing the next commit (except if I
explicitely asked the opposite), which implies that the index used for
commit (-i|-p) is the same as the usual one.
> +5. by using the --interactive or --patch switches with the 'commit' command
> + to decide one by one which files or hunks should be part of the commit,
> + before finalizing the operation. Currently, this is done by invoking
> + 'git add --interactive'.
... or git add --patch.
> - if (!!also + !!only + !!all + !!interactive > 1)
> - die("Only one of --include/--only/--all/--interactive can be used.");
> + if (!!also + !!only + !!all + !!interactive + !!patch_interactive > 1)
> + die("Only one of --include/--only/--all/--interactive/--patch can be used.");
If I read correctly, this forbids "git commit --interactive --patch",
while "git add --interactive --patch" is allowed, and equivalent to
"--patch" alone.
Other than that, the patch looks good.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2010-12-26 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-26 15:36 [PATCH] Add support for -p/--patch to git-commit Conrad Irwin
2010-12-26 16:30 ` Matthieu Moy [this message]
2010-12-26 17:56 ` Conrad Irwin
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=vpqr5d4cx9e.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=conrad.irwin@gmail.com \
--cc=git@vger.kernel.org \
/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