From: Thomas Rast <trast@student.ethz.ch>
To: bill lam <cbill.lam@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: how to split a hunk
Date: Wed, 28 Oct 2009 14:06:10 +0100 [thread overview]
Message-ID: <200910281406.12923.trast@student.ethz.ch> (raw)
In-Reply-To: <20091028022105.GE3938@debian.b2j>
bill lam wrote:
> There are occasions where diff of a file is
>
> - aaaa
> + bbbb
> + cccc
>
> I want to add lines bbbb and cccc as separated commits, but git-add -p
> seem cannot further split this hunk. Do I have no choice but to edit
> it by hand and commit the bbbb and then edit the file to add back the
> cccc?
There's also the 'git add -p' [e]dit feature, which pops up the patch
in an editor. There are instructions in that file, but in this case,
you can simply remove one of the additions.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2009-10-28 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-28 2:21 how to split a hunk bill lam
2009-10-28 3:11 ` Geert Bosch
2009-10-28 15:26 ` bill lam
2009-10-28 13:06 ` Thomas Rast [this message]
2009-10-28 15:16 ` bill lam
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=200910281406.12923.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=cbill.lam@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