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

Fixes #3090 and #2575 - Treats .git/gitdir as cwd on "empty" bare clones #3092

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hwangh95
Copy link

@hwangh95 hwangh95 commented Jan 7, 2024

Description

There are cases for having bare clones with multiple worktrees in the same folder to manage various versions in a workspace

Currently, however, the only supported way to do this is to have the .git/ files such as HEAD, branches/, refs/, worktrees/, etc in the same folder as your actual worktrees. This makes your workspace very cluttered and is counterproductive to the structured way of multiple worktrees

What many of us prefer is to have an "empty" bare clone with the normal bare clone files within the .git/ folder or another folder labeled .bare and use a .git file with a gitdir reference

This fix will allow for the worktrees view to function the same way it would show on a git worktree list command

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@hwangh95 hwangh95 force-pushed the fix-empty-bare-clone-parsing branch from 5df0c1b to 8a0a323 Compare January 7, 2024 00:21
@hwangh95 hwangh95 force-pushed the fix-empty-bare-clone-parsing branch 2 times, most recently from fa54bdf to fc0ffd4 Compare January 26, 2024 09:45
@hwangh95
Copy link
Author

@eamodio Hello, could you please have a look at this PR?

…n "empty" bare clones

There are cases for having bare clones with multiple worktrees in the
same folder to manage various versions in a workspace

Currently, however, the only supported way to do this is to have the
.git/ files such as HEAD, branches/, refs/, worktrees/, etc in the same
folder as your actual worktrees. This makes your workspace very
cluttered and is counterproductive to the structured way of multiple
worktrees

What many of us prefer is to have an "empty" bare clone with the normal
bare clone files within the .git/ folder or another folder labeled .bare
and use a .git file with a gitdir reference

This fix will allow for the worktrees view to function the same way it
would show on a `git worktree list` command
@hwangh95
Copy link
Author

@d13 Hey sorry for the ping but could you look at this PR? Or is there someone else who can? I've been waiting for feedback for about a month now

@hwangh95
Copy link
Author

@d13 Still waiting for feedback on this

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.

None yet

1 participant