Files
git/builtin
Shaoxuan Yuan b29ad38322 pathspec.h: move pathspec_needs_expanded_index() from reset.c to here
Method pathspec_needs_expanded_index() in reset.c from 4d1cfc1351
(reset: make --mixed sparse-aware, 2021-11-29) is reusable when we
need to verify if the index needs to be expanded when the command
is utilizing a pathspec rather than a literal path.

Move it to pathspec.h for reusability.

Add a few items to the function so it can better serve its purpose as
a standalone public function:

* Add a check in front so if the index is not sparse, return early since
  no expansion is needed.

* It now takes an arbitrary 'struct index_state' pointer instead of
  using `the_index` and `active_cache`.

* Add documentation to the function.

Helped-by: Victoria Dye <vdye@github.com>
Helped-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-08 13:23:26 -07:00
..
2022-06-07 14:10:56 -07:00
2022-04-06 09:42:14 -07:00
2022-08-05 15:52:14 -07:00
2022-02-17 16:25:05 -08:00
2021-10-28 09:57:09 -07:00
2022-04-04 10:56:23 -07:00
2022-07-18 13:31:57 -07:00
2022-07-01 11:43:43 -07:00
2022-03-09 13:38:24 -08:00
2022-06-07 14:10:56 -07:00
2022-04-06 15:21:59 -07:00
2022-07-18 13:31:53 -07:00
2022-06-10 15:04:15 -07:00
2022-08-03 13:36:09 -07:00
2022-01-10 11:52:56 -08:00
2022-07-14 11:24:11 -07:00
2022-06-10 15:04:13 -07:00
2021-11-03 13:25:36 -07:00