Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty folder issue in Repositoy.Worktrees.Add #2099

Conversation

enriqueraso
Copy link

This PR is fixing an issue when creating a worktree. It creates an empty folder with .git file only. 0.26.2 was the Latest version that creating a worktree works well and it was using the GIT_CHECKOUT_FORCE as checkout strategy.

  • Set GIT_CHECKOUT_FORCE as checkout strategy when creating a worktree.
  • Update current and add unit tests in WorktreeFixture.

@enriqueraso enriqueraso marked this pull request as draft June 4, 2024 09:13
@enriqueraso enriqueraso marked this pull request as ready for review June 4, 2024 09:13
@bording bording force-pushed the bug/Repositoy.Worktrees.Add_creates_an_empty_folder_for_the_worktree branch from 0541390 to b264cf6 Compare November 24, 2024 07:48
@bording
Copy link
Member

bording commented Nov 24, 2024

@enriqueraso Thanks for the PR. I rebased it and made a few tweaks. I also decided to use GIT_CHECKOUT_SAFE instead of GIT_CHECKOUT_FORCE since that aligns better with the libgit2 default setting.

@bording bording force-pushed the bug/Repositoy.Worktrees.Add_creates_an_empty_folder_for_the_worktree branch from c8fe89c to 5077c1e Compare November 24, 2024 08:04
@bording bording force-pushed the bug/Repositoy.Worktrees.Add_creates_an_empty_folder_for_the_worktree branch from 5077c1e to 704a25b Compare November 24, 2024 08:45
@bording bording merged commit 5fd810d into libgit2:master Nov 24, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants