Skip to contentSkip to conversation

sparse-checkout disable followed by re-init

Possible Bug [email protected] 1 participant 1 message Feb 7, 2022

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: February 7, 2022 4:57 AM
To: [email protected]
Subject: [Possible Bug] sparse-checkout disable followed by re-init

Quoted 7 lines

Hi All,

I noticed a change at 2.35.1 regarding sparse-checkout and am wondering whether I am just missing something:

1. Create upstream.
2. Clone with --no-checkout --depth=1 --filter=blob:none 3.

sparse-checkout init

Quoted 1 line

4. sparse-checkout set, with a pattern 5. sparse-checkout list 6. checkout

master

Quoted 1 line

7. sparse-checkout reapply 8. sparse-checkout add (up to here, everything

is fine,

Quoted 1 line

the working area is consistent with the sparsity patterns) 9.

sparse-checkout

Quoted 1 line

disable (the disable works - I think) 10. sparse-checkout list reports

fatal: this

Quoted 1 line

worktree is not sparse, which is new in 2.35.1. In 2.34.1, the sparse

patterns are

Quoted 1 line

reported without error. I think this is incorrect behaviour because the

sparse

Quoted 3 lines

patterns are still configured.
Then I try to recover
11. sparse-checkout init (seems to work - no errors) 12. sparse-checkout

list

Quoted 1 line

(correctly reports what was previously set/add) 13. sparse-checkout

reapply

Quoted 1 line

(does nothing apparent - the objects that added to the working area during

the

Quoted 1 line

disable are still there. My assumption was that the files not matching the

sparsity

Quoted 19 lines

patterns would be pruned).

The .git/config is:
[core]
repositoryformatversion = 1
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = file:///home/randall/stuff/src.git fetch = +refs/heads/master:refs/remotes/origin/master promisor = true
partialclonefilter = blob:none
[branch "master"]
remote = origin
merge = refs/heads/master
[extensions]
worktreeConfig = true

Quoted 1 line

My question is, from this point, is there a way to recover the sparsity of

the

Quoted 1 line

working index (which I expect), or do I have to clone again (not

desirable). This

Quoted 1 line

seems like a functional change. What is weird to me is that I did not

expect a

Quoted 4 lines

worktreeConfig=true in this situation.

Thanks,
Randall

Apologies for the wrapping. Outlook. Argh.