Skip to content

Support bare repositories with different worktrees #34

Description

@dalewking

I need the ability to work with a bare repo with multiple work trees. So what I would like to be able to see is:

  • The ability to pass a path to the actual git directory like "/some/directory/.git" or in the case of true bare repository a path like "/some/directory/myProject.git" and get a GitDir._raw of that path without a work tree. All that requires is changing
    if (returnedPath == '.git') {

to

    if (returnedPath == '.git' || returnedPath = '.') {
  • To better support working trees you might want to think about changing the --git-dir argument to --git-common-dir
  • The ability to take a GitDir and create a version with another working tree. You can verify that working tree arg passed points to the actual git dir using --git-common-dir

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions