Files
git/builtin
Elijah Newren 04988c8d18 unpack-trees: introduce preserve_ignored to unpack_trees_options
Currently, every caller of unpack_trees() that wants to ensure ignored
files are overwritten by default needs to:
   * allocate unpack_trees_options.dir
   * flip the DIR_SHOW_IGNORED flag in unpack_trees_options.dir->flags
   * call setup_standard_excludes
AND then after the call to unpack_trees() needs to
   * call dir_clear()
   * deallocate unpack_trees_options.dir
That's a fair amount of boilerplate, and every caller uses identical
code.  Make this easier by instead introducing a new boolean value where
the default value (0) does what we want so that new callers of
unpack_trees() automatically get the appropriate behavior.  And move all
the handling of unpack_trees_options.dir into unpack_trees() itself.

While preserve_ignored = 0 is the behavior we feel is the appropriate
default, we defer fixing commands to use the appropriate default until a
later commit.  So, this commit introduces several locations where we
manually set preserve_ignored=1.  This makes it clear where code paths
were previously preserving ignored files when they should not have been;
a future commit will flip these to instead use a value of 0 to get the
behavior we want.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-27 13:38:37 -07:00
..
2021-09-10 11:46:29 -07:00
2021-02-25 16:43:29 -08:00
2021-06-04 07:50:26 +09:00
2021-02-25 16:43:30 -08:00
2021-02-25 16:43:30 -08:00
2021-07-28 13:17:59 -07:00
2021-09-10 11:46:29 -07:00
2021-05-07 12:47:41 +09:00
2021-06-02 07:34:27 +09:00
2021-09-10 11:46:28 -07:00
2021-04-14 13:47:21 -07:00
2021-07-22 11:54:30 -07:00
2021-04-07 16:54:08 -07:00
2021-01-25 14:19:19 -08:00
2021-07-30 12:14:27 -07:00