wasm-git icon indicating copy to clipboard operation
wasm-git copied to clipboard

`could not remove directory` error during branch removal

Open ma2ciek opened this issue 1 year ago • 2 comments

Hello, @petersalomonsen,

First of all, I’m really impressed by the wasm-git library, good job!

I recently encountered an issue while working with the library, and I’m not sure how to handle it. It occurs during the removal of branches. When calling:

lg.callAndCaptureOutput(['branch', '-d', BRANCH_NAME]);
await syncFS();
lg.callAndCaptureOutput(['push', ':refs/heads/BRANCH_NAME']);
await syncFS();

I receive the following error from time to time:

Error branch move [-1] - could not remove directory '/[REPO]/.git/refs/heads/[BRANCH_NAME]': still present.

Retrying the operation often helps but not always.

Have you encountered maybe such an error?

ma2ciek avatar Jan 11 '24 21:01 ma2ciek

Hi,

Thanks for your feedback!

I have not seen this error before. Are you able to write a test case that reproduce the issue?

petersalomonsen avatar Jan 12 '24 20:01 petersalomonsen

@ma2ciek how do you have branch working?

samwho avatar Jan 27 '24 16:01 samwho