From: Junio C Hamano Date: Thu, 05 Jun 2008 08:16:19 GMT Subject: Re: [RFC PATCH] git-add--interactive: manual hunk editing mode v2 Message-ID: <7vprqw2t64.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080605014618.GA27381@sigill.intra.peff.net> Jeff King writes: > So perhaps manual hunk editing is simply something for advanced users > who are comfortable with the patch format. Exactly. To them, "git diff >patch && vi patch && git apply --cached > +# Empty lines and lines starting with # will be removed. > > What about lines starting with characters besides -, +, space, or @? > They will normally be ignored by diff. Beware that a totally empty line is the same as an empty context line "SP LF". For the rest of your comments, I agree with the Perl style (use of map and grep instead of repeated push in loops). The end user input, what the code needs to parse and accept, can screw you up royally and your parsing needs to be careful, and the code looks fragile.