git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* more novice-friendly behaviour of `git add -p`
@ 2016-05-20 13:06 enrico
  2016-05-20 15:05 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: enrico @ 2016-05-20 13:06 UTC (permalink / raw)
  To: git

Hello all,
I have encountered a couple of non-necessary difficulties when editing a
patch during a `git add -p`.

Firstly, the help message says
"To remove '-' lines, make them ' ' lines (context)."
which is a bit confusing because that "them" refers to '-', not to 'lines'.
I spent a good half hour changing '-' lines to lines containing a single
white space but git was not very happy about it.
I would suggest to change that line with
"To remove '-' lines, change '-' into ' ' (for context)"

Secondly, as discussed here
(http://git.661346.n2.nabble.com/git-add-patch-bug-with-split-edit-td2171634.html)
and in numerous stackoverflow questions, the behaviour of the "edit" (e)
option during an interactive add is a bit...bizarre: it requires the user to
do a lot of gymnastic if (s)he is editing a hunk after having used the split
(s) option, and nine times out of ten the patch will not apply cleanly.
I would suggest to change the behaviour of the interactive add to only allow
edits when the hunk has not been split (possibly with a one-line explanation
for why editing is not possible appearing when inside a split hunk). Since
editing is more powerful than splitting this would not result in a loss of
generality, but, in my humble opinion, in a much nicer experience for
novices and experts alike.

Best regards,
enrico

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

end of thread, other threads:[~2016-05-20 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 13:06 more novice-friendly behaviour of `git add -p` enrico
2016-05-20 15:05 ` Junio C Hamano
2016-05-20 15:32   ` enrico

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