Re: [PATCH 1/2] read-tree --reset: add --protect-untracked
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 1, 2019, 10:18 UTC
- Message-ID
- <CACsJy8AeOWEMVcDiJky1SbSitkyBxSWu9CeDf8aspyLA1VDe8g@mail.gmail.com>
- In-Reply-To
- <20190501101403.20294-2-phillip.wood123@gmail.com>
On Wed, May 1, 2019 at 5:14 PM Phillip Wood <phillip.wood123@gmail.com> wrote:
Show 18 quoted lines
> 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.
Show 7 quoted lines
> + unsigned int merge, > update, > clone, > index_only, > -- > 2.21.0 >
-- Duy