scalar: implement the `delete` command
commitd85ada7cbdc7a1ff6b98891cec87e54ea4a303ae
authorMatthew John Cheetham <mjcheetham@outlook.com>
Fri, 3 Dec 2021 13:34:28 +0000 (3 13:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 5 Dec 2021 05:52:24 +0000 (4 21:52 -0800)
tree4ba5fa07744dc433b03545ab599eaa00bda966c7
parent45826760758ef09626d941c19993144b6fbd6440
scalar: implement the `delete` command

Delete an enlistment by first unregistering the repository and then
deleting the enlistment directory (usually the directory containing the
worktree `src/` directory).

On Windows, if the current directory is inside the enlistment's
directory, change to the parent of the enlistment directory, to allow us
to delete the enlistment (directories used by processes e.g. as current
working directories cannot be deleted on Windows).

Co-authored-by: Victoria Dye <vdye@github.com>
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/scalar/scalar.c
contrib/scalar/scalar.txt
contrib/scalar/t/t9099-scalar.sh