Re: [RFC PATCH] git-add--interactive: manual hunk editing mode v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, 9 Jun 2008, Thomas Rast wrote:

> Jeff King wrote:
> >
> > I wrote this after reading just your first patch, and it looks like 
> > you've made much progress since. It seems like Thomas' patch could 
> > just get rid of all the recounting entirely, and just pass off the 
> > edited hunks to "git apply --recount". Which should make his patch 
> > much smaller and more straightforward.
> 
> I think there's no way to split hunks, in the way I currently "help" 
> with @@ line guessing, using just the --recount feature.  Unless the 
> editor helps you with adding complete correct @@ lines in the middle of 
> hunks (Emacs does that).  I don't think it is at all possible to remove 
> the middle part of a hunk in Johannes' scheme without somehow figuring 
> out the corresponding @@ line (or at least its old line number) or 
> editing away every +/- line.
> 
> Then again it's not always easy even with my patch: you may have to
> manually insert extra context because of the rule against zero lines
> of context.

That is actually where Junio convinced me that my approach is wrong: he 
said that you can _only_ reliably split a hunk at common lines.

The thing is: if you split _not_ at a common line, the context of the 
second part would _change_ depending if you want to apply the first part 
or not.

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux