Thread (61 messages) 61 messages, 7 authors, 2021-04-14

Re: [PATCH] rm: honor sparse checkout patterns

flat view

From: Jeff Hostetler <hidden>
Date: 2020-11-16 14:30:47


On 11/13/20 8:47 AM, Derrick Stolee wrote:
On 11/12/2020 6:54 PM, Elijah Newren wrote:
quoted
Hi,

On Thu, Nov 12, 2020 at 1:02 PM Matheus Tavares
[off-list ref] wrote:
quoted
Make git-rm honor the 'sparse.restrictCmds' setting, by restricting its
operation to the paths that match both the command line pathspecs and
the repository's sparsity patterns. This better matches the expectations
of users with sparse-checkout definitions, while still allowing them
to optionally enable the old behavior with 'sparse.restrictCmds=false'
or the global '--no-restrict-to-sparse-paths' option.
(For Stolee:) Did this arise when a user specified a directory to
delete, and a (possibly small) part of that directory was in the
sparse checkout while other portions of it were outside?
The user who suggested this used a command like 'git rm */*.csprojx' to
remove all paths with that file extension, but then realized that they
were deleting all of those files from the entire repo, not just the
current sparse-checkout.
Aren't the wildcards expanded by the shell before the command
line is given to Git?  So the Git command should only receive
command line args that actually match existing files, right??

Jeff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help