Re: [PATCH 1/2] read-tree --reset: add --protect-untracked
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 1, 2019, 10:32 UTC
- Message-ID
- <CACsJy8DD-Ubb9VyZCWdkpS1OgPpToMmrdMceXPUp3AWbfhvgdQ@mail.gmail.com>
- In-Reply-To
- <CACsJy8AeOWEMVcDiJky1SbSitkyBxSWu9CeDf8aspyLA1VDe8g@mail.gmail.com>
On Wed, May 1, 2019 at 5:18 PM Duy Nguyen <pclouds@gmail.com> wrote:
Show 26 quoted lines
>
> On Wed, May 1, 2019 at 5:14 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
> > diff --git a/unpack-trees.h b/unpack-trees.h
> > index d344d7d296..732b262c4d 100644
> > --- a/unpack-trees.h
> > +++ b/unpack-trees.h
> > @@ -41,9 +41,15 @@ void setup_unpack_trees_porcelain(struct unpack_trees_options *opts,
> > */
> > void clear_unpack_trees_porcelain(struct unpack_trees_options *opts);
> >
> > +enum unpack_trees_reset_type {
> > + UNPACK_NO_RESET = 0,
> > + UNPACK_RESET_OVERWRITE_UNTRACKED,
> > + UNPACK_RESET_PROTECT_UNTRACKED
> > +};
> > +
> > struct unpack_trees_options {
> > - unsigned int reset,
> > - merge,
> > + enum unpack_trees_reset_type reset;
>
> Can we add protected_untracked that can be used in combination with
> the current "reset"?
>
> This opens up (or raises the question about) the opportunity to
> protect untracked changes on non-reset updates.Bahh. "protect_untracked" is already on for non-reset updates. Sorry for the noise.
-- Duy