Skip to content

Support running in git worktree repositories #48

@vorph1

Description

@vorph1

Hi, I'm getting an error when running in a repository using git worktrees - in this scenario there is no .git folder, instead the top level directory contains the usual .git folder contents and any number of worktree directories with working copies

Unhandled exception. System.InvalidOperationException: This tool should be run from within a git repository.
   at ReGitLint.Cleanup.GetGitDirectory() in /srv/ReGitLint/Cleanup.cs:line 426
   at ReGitLint.Cleanup.GetIncludeArgs(HashSet`1 filePaths) in /srv/ReGitLint/Cleanup.cs:line 322
   at ReGitLint.Cleanup.Run(String[] remainingArguments) in /srv/ReGitLint/Cleanup.cs:line 261
   at ManyConsole.ConsoleCommandDispatcher.DispatchCommand(IEnumerable`1 commands, String[] arguments, TextWriter consoleOut, Boolean skipExeInExpectedUsage)
   at ReGitLint.Program.Main(String[] args) in /srv/ReGitLint/Program.cs:line 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions