Files
git/builtin
Elijah Newren 4ce504360b sparse-checkout: error or warn when given individual files
The set and add subcommands accept multiple positional arguments.
The meaning of these arguments differs slightly in the two modes:

Cone mode only accepts directories.  If given a file, it would
previously treat it as a directory, causing not just the file itself to
be included but all sibling files as well -- likely against users'
expectations.  Throw an error if the specified path is a file in the
index.  Provide a --skip-checks argument to allow users to override
(e.g. for the case when the given path IS a directory on another
branch).

Non-cone mode accepts general gitignore patterns.  There are many
reasons to avoid this mode, but one possible reason to use it instead of
cone mode: to be able to select individual files within a directory.
However, if a file is passed to set/add in non-cone mode, you won't be
selecting a single file, you'll be selecting a file with the same name
in any directory.  Thus users will likely want to prefix any paths they
specify with a leading '/' character; warn users if the patterns they
specify exactly name a file because it means they are likely missing
such a leading slash.

Reviewed-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-20 00:01:15 -08:00
..
2022-02-09 14:21:00 -08:00
2020-07-30 19:18:06 -07:00
2021-12-21 15:03:17 -08:00
2021-10-28 09:57:09 -07:00
2021-02-25 16:43:30 -08:00
2022-02-09 14:21:00 -08:00
2021-10-23 10:45:25 -07:00
2022-01-10 11:52:56 -08:00
2021-04-14 13:47:21 -07:00
2022-02-09 14:21:00 -08:00
2021-09-28 10:31:02 -07:00
2022-01-10 11:52:53 -08:00
2020-03-24 15:04:44 -07:00
2022-01-03 16:24:15 -08:00
2022-01-10 11:52:56 -08:00
2022-02-05 09:42:31 -08:00
2022-01-05 13:31:00 -08:00
2021-11-03 13:25:36 -07:00
2020-08-11 18:04:11 -07:00
2019-06-19 08:19:21 -07:00