git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Phillip WoodNext: Duy Nguyen
Message 3 of 12 in “read-tree: improve untracked file support”
  1. 0/2 read-tree: improve untracked file supportPhillip Wood, May 1, 2019
  2. 1/2 read-tree --reset: add --protect-untrackedPhillip Wood, May 1, 2019
  3. Duy NguyenMay 1, 2019
  4. Duy NguyenMay 1, 2019
  5. Duy NguyenMay 2, 2019
  6. Phillip WoodMay 3, 2019
  7. 2/2 read-tree: add --exclude-standardPhillip Wood, May 1, 2019
  8. Duy NguyenMay 1, 2019
  9. Phillip WoodMay 1, 2019
  10. Duy NguyenMay 2, 2019
  11. Phillip WoodMay 7, 2019
  12. Duy NguyenMay 7, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.