git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] (git commit --patch --message $MESSAGE) disallows hunk editing
@ 2012-10-23  5:48 Max Nanasy
  2014-02-26 15:07 ` Pierre-Olivier Vares
  2014-09-29 23:01 ` Max Nanasy
  0 siblings, 2 replies; 3+ messages in thread
From: Max Nanasy @ 2012-10-23  5:48 UTC (permalink / raw)
  To: git

Tested against v1.7.12.4

Steps to reproduce:
	A. cd $DIRTY_WORKING_COPY
	B. git commit --patch --message $MESSAGE
	C. Stage this hunk? e
Expected behavior:
	After step C, the hunk opens in the user's editor
Actual behavior:
	After step C, the hunk is selected unedited (as if the user had entered "y")

AFAICT, this occurs because of the following code in
builtin/commit.c:parse_and_validate_options:
	if (... || message.len || ...)
		use_editor = 0;
	...
	if (!use_editor)
		setenv("GIT_EDITOR", ":", 1);
Because --message is specified, GIT_EDITOR is set to ":", which
prevents the user from editing hunks, although the intent is most
likely to just prevent the user from editing the commit message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-29 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-23  5:48 [BUG] (git commit --patch --message $MESSAGE) disallows hunk editing Max Nanasy
2014-02-26 15:07 ` Pierre-Olivier Vares
2014-09-29 23:01 ` Max Nanasy

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).