Derrick Stolee
d7c4415e55
rm: skip sparse paths with missing SKIP_WORKTREE
...
If a path does not match the sparse-checkout cone but is somehow missing
the SKIP_WORKTREE bit, then 'git rm' currently succeeds in removing the
file. One reason a user might be in this situation is a merge conflict
outside of the sparse-checkout cone. Removing such a file might be
problematic for users who are not sure what they are doing.
Add a check to path_in_sparse_checkout() when 'git rm' is checking if a
path should be considered for deletion. Of course, this check is ignored
if the '--sparse' option is specified, allowing users who accept the
risks to continue with the removal.
This also removes a confusing behavior where a user asks for a directory
to be removed, but only the entries that are within the sparse-checkout
definition are removed. Now, 'git rm <dir>' will fail without '--sparse'
and will succeed in removing all contained paths with '--sparse'.
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
..
2021-09-28 10:31:02 -07:00
2021-07-13 15:20:20 -07:00
2020-07-30 19:18:06 -07:00
2018-08-13 14:14:44 -07:00
2019-01-02 13:05:30 -08:00
2021-07-13 15:20:20 -07:00
2021-02-25 16:43:29 -08:00
2021-04-20 11:09:50 -07:00
2021-04-28 09:25:45 +09:00
2021-07-06 12:10:17 -07:00
2021-06-04 07:50:26 +09:00
2019-01-24 11:55:06 -08:00
2021-07-01 12:32:22 -07:00
2021-01-12 14:04:42 -08:00
2017-11-06 14:24:28 +09:00
2021-06-15 12:07:56 +09:00
2021-05-16 21:05:23 +09:00
2021-07-14 15:05:53 -07:00
2021-07-01 12:32:22 -07:00
2021-06-14 13:33:26 +09:00
2021-03-29 14:06:08 -07:00
2021-01-06 15:10:49 -08:00
2020-04-28 10:47:10 -07:00
2021-08-04 13:28:53 -07:00
2021-04-19 14:16:59 -07:00
2018-11-13 14:22:02 +09:00
2021-03-15 14:32:51 -07:00
2021-03-15 14:32:51 -07:00
2020-11-25 12:30:18 -08:00
2020-10-16 12:30:45 -07:00
2021-04-27 16:31:39 +09:00
2021-02-25 16:43:30 -08:00
2021-05-21 09:24:14 +09:00
2021-02-25 16:43:30 -08:00
2021-07-28 13:17:59 -07:00
2021-07-08 13:15:04 -07:00
2020-09-30 12:53:47 -07:00
2021-04-27 16:31:39 +09:00
2021-04-27 16:31:38 +09:00
2021-02-05 13:49:54 -08:00
2021-07-16 17:42:48 -07:00
2020-03-24 15:04:43 -07:00
2021-05-07 12:47:41 +09:00
2021-07-26 12:19:20 -07:00
2021-06-02 07:34:27 +09:00
2021-05-12 07:00:45 +09:00
2019-04-01 11:57:39 +09:00
2021-07-01 12:32:22 -07:00
2019-05-13 14:22:53 +09:00
2021-07-06 13:09:20 -07:00
2021-07-12 12:09:53 -07:00
2021-05-25 16:21:20 +09:00
2021-07-28 13:17:58 -07:00
2021-07-01 12:32:22 -07:00
2021-04-07 16:54:08 -07:00
2021-03-20 16:09:26 -07:00
2021-05-10 15:06:22 +09:00
2017-05-08 12:18:19 +09:00
2020-02-11 09:59:39 -08:00
2018-11-06 12:56:29 +09:00
2021-04-14 13:47:21 -07:00
2021-06-09 09:15:58 +09:00
2019-08-19 10:08:03 -07:00
2021-05-11 12:47:31 +09:00
2021-09-09 15:49:04 -07:00
2021-03-28 19:03:10 -07:00
2021-06-09 09:15:58 +09:00
2021-07-19 15:24:01 -07:00
2021-07-26 12:19:20 -07:00
2021-01-28 12:03:26 -08:00
2021-03-13 16:00:09 -08:00
2021-05-27 12:36:58 +09:00
2021-04-27 16:31:38 +09:00
2019-12-09 12:26:40 -08:00
2020-03-24 15:04:44 -07:00
2021-06-19 16:36:17 +09:00
2021-06-02 10:12:03 +09:00
2021-03-29 14:06:08 -07:00
2020-04-28 10:47:10 -07:00
2021-09-09 15:49:05 -07:00
2021-07-12 12:09:53 -07:00
2021-02-11 09:21:52 -08:00
2020-07-28 15:02:18 -07:00
2017-05-30 14:45:04 +09:00
2021-04-07 16:54:08 -07:00
2021-04-28 13:36:13 +09:00
2020-07-30 19:18:06 -07:00
2021-05-11 12:47:31 +09:00
2021-03-14 15:57:59 -07:00
2021-07-12 10:12:31 -07:00
2021-05-17 18:39:53 +09:00
2021-09-09 15:49:05 -07:00
2021-09-28 10:31:02 -07:00
2020-10-03 09:59:19 -07:00
2021-01-25 14:19:19 -08:00
2021-06-28 09:33:06 -07:00
2021-04-27 16:31:39 +09:00
2021-01-21 15:51:31 -08:00
2021-09-07 22:41:10 -07:00
2021-07-16 17:42:53 -07:00
2018-12-26 15:41:47 -08:00
2021-08-04 13:28:52 -07:00
2021-03-14 15:57:59 -07:00
2021-04-20 11:09:50 -07:00
2021-04-27 16:31:39 +09:00
2021-04-14 13:47:29 -07:00
2020-11-16 13:44:01 -08:00
2018-02-09 10:24:50 -08:00
2020-07-30 19:18:06 -07:00
2019-05-13 14:22:53 +09:00
2017-06-15 12:56:22 -07:00
2019-07-31 14:38:56 -07:00
2020-08-11 18:04:11 -07:00
2019-06-19 08:19:21 -07:00
2021-07-15 13:30:59 -07:00
2019-05-13 14:22:53 +09:00