Hi Matthew and Elijah, On Mon, 4 Oct 2021, Matthew Cheetham wrote: > On 28 Sep 2021, at 7:24 am, Elijah Newren <newren@xxxxxxxxx> wrote: > > > But if the current directory is inside the enlistment's directory, > > didn't that happen because the parent process' current directory was > > inside the enlistment directory? Or was there some kind of directory > > switching that scalar itself was doing causing it to be inside the > > enlistment directory? > > Yes to the latter. `setup_enlistment_directory` changes the current > directory much like `setup_git_directory`. > > > If the the current directory was inside the enlistment's directory > > because it inherited a parent process' current directory, wouldn't > > that also prevent deleting it? If so, should there be a special check > > for that case and pre-emptively returning an error rather than > > attempting the recursive directory deletion and just spitting out an > > error when it fails? > > You are correct. Speaking to Johannes about this I believe he is looking > to add a check/error in a new patch series revision. Indeed, I did notice GGG#1037, and I changed the code so that it detects whether `scalar delete` was called from within the enlistment, and refuses to run in that case. Users will have to call `scalar delete <path>` from outside the enlistment. Ciao, Dscho