Re: [PATCH 01/11] Start to implement a built-in version of `git add --interactive`
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 13, 2019, 11:14 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1905131313180.44@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20190501022123.GA22549@sigill.intra.peff.net>
Hi Peff,
On Tue, 30 Apr 2019, Jeff King wrote:
Show 14 quoted lines
> 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.
Show 7 quoted lines
> > 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