| 800 | self.set_exec() |
| 801 | |
| 802 | def _commit_granular_dir(self, filter_info, hardlink) -> Optional["HashFile"]: |
| 803 | prefix = self.fs.parts(self.fs.relpath(filter_info, self.fs_path)) |
| 804 | staging, _, obj = self._build( |
| 805 | self.cache, self.fs_path, self.fs, self.hash_name, ignore=self.dvcignore |
| 806 | ) |
| 807 | assert isinstance(obj, Tree) |
| 808 | save_obj = obj.filter(prefix) |
| 809 | assert isinstance(save_obj, Tree) |
| 810 | checkout_obj = save_obj.get_obj(self.cache, prefix) |
| 811 | with TqdmCallback(desc=f"Committing {self} to cache", unit="file") as cb: |
| 812 | otransfer( |
| 813 | staging, |
| 814 | self.cache, |
| 815 | {save_obj.hash_info} | {oid for _, _, oid in save_obj}, |
| 816 | shallow=True, |
| 817 | hardlink=hardlink, |
| 818 | callback=cb, |
| 819 | ) |
| 820 | return checkout_obj |
| 821 | |
| 822 | def dumpd(self, **kwargs): # noqa: C901, PLR0912 |
| 823 | from dvc.cachemgr import LEGACY_HASH_NAMES |