Created attachment 839689 [details]
Exception stack trace
Description of problem:
When removing repository in UI or via REST it is not deleted from file system completely. UI reports no error, so it seems the operation completed successfully, but when it is invoked via REST it fails with exception. It seems that JGit fails to delete git .pack files.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. go to Administration in Workbench
2. clone a repository that has some Packfiles (http://git-scm.com/book/en/Git-Internals-Packfiles)
3. remove the repository
The repository root directory still exists in .niogit. It contains some .pack files and maybe some refs, too.
The removed repository directory should be removed completely.
To reproduce with REST from command line:
curl -u '<user:password>' -H 'Accept: application/json' -H 'Content-Type: application/json' -X DELETE http://localhost:8080/business-central/rest/repositories/my-repository
I wasn't able to successfully run this command in Cygwin, though. We use a Java REST client code in automated test suite.
Fix(*) pushed to master and product branch of UberFire repo:
* - I coudln't yet test on my computer as I'm still strugling to setup a windows VM, but I didn't wanna block others to have it in hands soon.
Still broken in CR1. Removing a repository typically leaves a single Packfile in the repo directory.
The impact of this issue is that unless the repo is deleted completely, users won't be able to clone it again later.
This looks like a JGit issue, I managed to implement a workaround (just for windows):
Cannot reproduce with 6.0.1.CR2.