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

Slashes in branch names #60

Open
pgierz opened this issue Jul 3, 2023 · 1 comment
Open

Slashes in branch names #60

pgierz opened this issue Jul 3, 2023 · 1 comment

Comments

@pgierz
Copy link

pgierz commented Jul 3, 2023

Hi there,

Thanks for this project, it has been quite useful. I have one feature request, and I'd be happy to help out myself, unfortunately I am only a beginner with rust.

In my own work, I like to organise branches under "virtual" folders, e.g. a typical project might look like this:

$ git branch
* master
  feat/my_cool_feat_1
  sprint/subtask_B
  sprint/subtask_C

It would be very cool to integrate this into the worktree command, so that I could have:

$ cd Code/my_project
$ ls
master/ feat/ sprint/
$ ls feat
feat/my_cool_feat_1/
$ cd feat/my_cool_feat_1
$ git branch
  master
* feat/my_cool_feat_1
  sprint/subtask_B
  sprint/subtask_C

At the moment, it seems slashes are not allowed in worktree names. Would that be difficult to implement?

Cheers,
Paul

@hakoerber
Copy link
Owner

Hey Paul,

you hit one of the issues that I've been thinking about since the beginning of the project 😄

See also #36

The gist is that git (i.e. the command line tool) supports worktrees with slashes no problem, but libgit2 handles slashes differently than git itself. This leads to various problems, as @maurelian alluded to in the linked issue.

I'm unfortunately not aware of the specific things that go wrong with slashes in worktree names. Could you show your use case and precisely how grm fails when you try to use it?

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

No branches or pull requests

2 participants