Re: [PATCH 01/11] Start to implement a built-in version of `git add --interactive`

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

 



Hi Peff,

On Tue, 30 Apr 2019, Jeff King wrote:

> On Tue, Apr 30, 2019 at 07:40:06PM -0400, Johannes Schindelin wrote:
>
> > And I also tried pretty hard to *not* bleed any internal state of
> > `add-interactive` into `builtin/add`, as I wanted the new code to be
> > as libified as possible (in a nearby thread, somebody wished for a new
> > `-p` mode that would essentially be a combined `git stash -p` and `git
> > add -p`, and with properly libified code such a beast is a lot more
> > feasible).
> >
> > Any idea how to deal with that?
>
> The most lib-ified thing is to just use the configset code. I.e.,
> wherever you need the config, just load it on demand via
> git_config_get_int or whatever.

True.

And it cost me *quite* a few days to implement the changes. But the result
is definitely a lot better, in my opinion.

> > Or I invent a new convention where `add_i_config()` returns 1 when it
> > consumed the key/value pair. But that would set a precedent that is
> > inconsistent with the entire existing code base, something I am
> > uncomfortable to do for the sake of `add -i`...
>
> Yes, don't do that. :) That was the same thing we finally got rid of for
> userdiff_config().

Thanks for stopping me. I did not remember about the userdiff_config()
thing.

Ciao,
Dscho




[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