Derrick Stolee 93d2c16041 mv: refuse to move sparse paths
Since cmd_mv() does not operate on cache entries and instead directly
checks the filesystem, we can only use path_in_sparse_checkout() as a
mechanism for seeing if a path is sparse or not. Be sure to skip
returning a failure if '-k' is specified.

To ensure that the advice around sparse paths is the only reason a move
failed, be sure to check this as the very last thing before inserting
into the src_for_dst list.

The tests cover a variety of cases such as whether the target is tracked
or untracked, and whether the source or destination are in or outside of
the sparse-checkout definition.

Helped-by: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-28 10:31:02 -07:00
..
2020-07-30 19:18:06 -07:00
2021-02-25 16:43:29 -08:00
2021-04-20 11:09:50 -07:00
2021-06-04 07:50:26 +09:00
2021-01-06 15:10:49 -08:00
2020-10-16 12:30:45 -07: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
2020-03-24 15:04:43 -07:00
2021-05-07 12:47:41 +09:00
2021-06-02 07:34:27 +09:00
2021-05-12 07:00:45 +09:00
2021-07-28 13:17:58 -07:00
2021-04-07 16:54:08 -07:00
2021-04-14 13:47:21 -07:00
2021-09-09 15:49:04 -07:00
2021-09-28 10:31:02 -07:00
2021-03-13 16:00:09 -08:00
2020-03-24 15:04:44 -07:00
2020-05-13 12:19:18 -07:00
2021-06-19 16:36:17 +09:00
2021-06-02 10:12:03 +09:00
2021-04-07 16:54:08 -07:00
2020-07-30 19:18:06 -07:00
2021-01-25 14:19:19 -08:00
2021-07-16 17:42:53 -07:00
2021-04-20 11:09:50 -07:00
2021-04-14 13:47:29 -07:00
2020-07-30 19:18:06 -07:00
2020-08-11 18:04:11 -07:00