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

key_bindings.ron should follow symlink #1751

Closed
okuramasafumi opened this issue Jul 8, 2023 · 5 comments · Fixed by #1767
Closed

key_bindings.ron should follow symlink #1751

okuramasafumi opened this issue Jul 8, 2023 · 5 comments · Fixed by #1767
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@okuramasafumi
Copy link

Describe the bug

When I use symlink to configure key bindings like below, it didn't work.

ln -s ~/dotfiles/git/gitui/keyconfig.ron ~/.config/gitui/keyconfig.ron

When I use cp instead of ln -s it worked.

To Reproduce
Steps to reproduce the behavior:

  1. Create key_bindings.ron somewhere (say, ~/key_bindings.ron)
  2. ln -s ~/keyconfig.ron ~/.config/gitui/keyconfig.ron
  3. Confirm that it is not applied

Expected behavior

Symlink should work.

Context (please complete the following information):

  • OS/Distro + Version: macOS 13.4.1
  • GitUI Version 0.23.0
  • Rust version: None (installed via Homebrew)

Additional context

I tried to use symlink since I wanted to put my config in my dotfiles. This could be pretty common.

@okuramasafumi okuramasafumi added the bug Something isn't working label Jul 8, 2023
@Muttsuri
Copy link

It's a hacky solution for now, but couldn't you use hard-links ?
I'm not familiar with macOS but given it's UNIX based it should work similarly, no ?
Short and clear soft-link vs hard-link difference, post here. And according to this macOS thread, you could create your hard-link with:

ln ~/dotfiles/git/gitui/keyconfig.ron ~/.config/gitui/keyconfig.ron

(yes it's just killing the -s soft-link flag)

I agree that it should be able to follow symlinks just but it might help you for now I hope 🙂

@extrawurst
Copy link
Collaborator

Should be easy to fix using https://doc.rust-lang.org/std/fs/fn.canonicalize.html on the file-path. should be unittestable

@extrawurst extrawurst added this to the v0.24 milestone Jul 12, 2023
@extrawurst extrawurst added the good first issue Good for newcomers label Jul 12, 2023
@TheBlackSheep3
Copy link
Contributor

Hey! Is this issue already assigned to someone? If not, I would like to work on it.

@extrawurst
Copy link
Collaborator

We don’t assign. You make a PR and that’s it :)

@TheBlackSheep3
Copy link
Contributor

TheBlackSheep3 commented Jul 21, 2023

Thanks. Will do :)

jeffreytse added a commit to jeffreytse/dotfiles that referenced this issue Aug 2, 2024
Gitui doesn't support the soft link, we can only utilize hard link
to make it work before a fixed version v0.24.2.

We lock version to prevent a breaking change in the future.

Refs:

- gitui-org/gitui#1751
- https://github.com/extrawurst/gitui/releases/tag/v0.24.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants