Re: selective git-update-index per diff(1) chunks
- From
- Peter Baumann <peter.b.baumann@stud.informatik.uni-erlangen.de>
- Date
- Dec 1, 2006, 11:33 UTC
- Message-ID
- <slrnen04os.a5.Peter.B.Baumann@xp.machine.xx>
- In-Reply-To
- <b6fcc0a0612010323x7554e47m5e6bdafe85fc8224@mail.gmail.com>
On 2006-12-01, Alexey Dobriyan <adobriyan@gmail.com> wrote:
Show 19 quoted lines
> Pretty often I end up with a file with two simple orthogonal fixes in it. > git-diff shows me both, that's OK. > > Now I want to commit them as two separate commits. So far, it's > * getting full diff > * cp(1) > * hand-edit both diffs > * commit first > * commit second > > Has anyone thought about aggregating this into git-update-index or > somewhere? > > git-update-index -C1,3 #chunks 1, 3 > git commit > git-update-index -C1,3 # chunks 2,5 in original numbering > git commit > > Relying on diff(1) definition of chunks is sorta hacky, though... I admit it.
I don't think it belongs in the plumbing, the git-update-index but I think something like this would be very usefull.
AFAIR darcs has this functionality. It selectively ask for each hunk if it should be commited. This would be awfull to have in git.
-Peter