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

Support for git worktrees #1383

Open
awinki opened this issue May 21, 2024 · 2 comments
Open

Support for git worktrees #1383

awinki opened this issue May 21, 2024 · 2 comments

Comments

@awinki
Copy link

awinki commented May 21, 2024

Description

I use git worktrees a lot on my machine, but i can't use our nuke build script to build our solutions. I always get the following error:

Unhandled exception. System.ArgumentException: No parent Git directory for 'D:\Development'
   at Nuke.Common.Assert.NotNull[T](T obj, String message, String argumentExpression) in /_/source/Nuke.Utilities/Assert.cs:line 73
   at Nuke.Common.Git.GitRepository.FromLocalDirectory(AbsolutePath directory) in /_/source/Nuke.Build/VCS/GitRepository.cs:line 49

Instead of a ".git" folder there's just ".git" file, when working with git worktrees.

Usage Example

No response

Alternative

No response

Could you help with a pull-request?

No

@ericburcham
Copy link

ericburcham commented Aug 20, 2024

@matkoch

Our team uses worktrees extensively and I would love to contribute to this issue. Of course I know not to "push" a PR, and this may be non-trivial, so where is the best place to start? It seems that adding the following to the issue would be helpful to begin with:

  1. Expected behavior
  2. Observed behavior
  3. Steps to reproduce (Linux and Powershell)

Of course I don't have permission to update the issue itself. Should I document these things in a comment and then start working on a PR, or is a discussion in order for this issue before I begin?

@awinki if I write up a more filled out version of the issue template, will you update the issue?

@nZeus
Copy link

nZeus commented Aug 29, 2024

I have the same issue.
To reproduce, simply create a worktree and run nuke script from the worktree folder.
It is indeed because the .git is a file, not a folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants