Skip to content

worktree: Review API for opening linked-worktrees #1812

@pjbgf

Description

@pjbgf

Feature Description

The existing support for linked worktrees is suboptimal, it requires the user to know that the given repository is in fact a linked worktree which may be puzzling for someone who isn't aware of Git's internals.

A few ideas on improvements for this feature:

  • Remove EnableDotGitCommonDir from PlainOpenOptions. This requires some consideration around the commonDir discoverability and whether users should have a way to determine what billy.Filesystem (or Loader) should be used for that.
  • Ensure seamless experience across Plain and non-Plain APIs. The recently added x/plumbing/worktree.Open may need to be deleted and that logic moved to git.Open instead.
  • Update documentation.
  • Review worktrees example.

x-ref:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions