git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Alternative to manual editing with git add --patch
@ 2015-10-14 15:07 Sven Helmberger
  2015-10-14 16:30 ` Matthieu Moy
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sven Helmberger @ 2015-10-14 15:07 UTC (permalink / raw)
  To: git

Hello,

I hope this hasn't been discussed before.

I'm a big fan of cleanliness in commits and therefore often use git add
--patch to sort code changes I made into the right commits etc.

What I then often encountered was the situation where I happened to have
inserted consecutive lines of code that conceptually belong to different
commits. Normally I can nicely split patches, but not in this case,
making manually editing the patch the only alternative.

Shouldn't there be at least a way to quickly say line-by-line if you
want to have it added or not?

Personally, I find manually editing just annoying, it seems overly
arcane, but it also prevents me from really recommending "add --patch"
as best practice. I think it's a really good idea for many reasons to do
so, but I can't really tell people already struggling with using git
that I expect them to edit patches manually.

Regards,
Sven Helmberger

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

end of thread, other threads:[~2015-10-15 15:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 15:07 Alternative to manual editing with git add --patch Sven Helmberger
2015-10-14 16:30 ` Matthieu Moy
2015-10-14 16:52 ` Johannes Schindelin
2015-10-14 17:50 ` Junio C Hamano
2015-10-14 23:36   ` Sven Helmberger
2015-10-15 10:11     ` Johannes Schindelin
2015-10-15 13:37       ` Sven Helmberger
2015-10-15 15:06         ` Johannes Schindelin
2015-10-15 15:22           ` Sven Helmberger

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