-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
GitLens creates a .gk
folder in the home dir.
#3660
Comments
This is by-design as that folder and its configuration is shared between our (GitKraken) tools (GitLens, GitKraken Desktop, and GitKraken CLI) |
This comment has been minimized.
This comment has been minimized.
Does this mean you are not open to any changes to moving the default location for that folder? 😕 |
Correct, our tools use that as a well-known location. It is also quite a common location for many tools. |
This is disappointing to hear, but is there anything that would change your mind? I would be happy to send a PR that uses an updated location when the old location is not present. Many projects already use XDG-compatible conventions, and many have transitioned after listening to their community. Some of us see openness to this kind of improvement as a litmus for how a project is willing to listen to feedback. |
Can you point me to other tools (vs code in particular) that do this? What would it look like? But as I said this isn't just a change that GitLens can make because our other tools rely on these same files. |
Unfortunately I don't have a large list of tools that follow the XDG conventions, as by definition I will not notice folders from them. However, https://wiki.archlinux.org/title/XDG_Base_Directory lists a large number of projects that used to have this issue but many of which have either moved their default folder or added a configuration option to change the location. Here is a selection based on a quick search of my GitHub notification history:
|
no it's not quite common, you are violating XDG DESKTOP PATH, you should google "common" folders before writing this nonsense |
@untainsYD keep this constructive |
oh, no, sorry, you are not constructive, you have broken the default path on Linux, and saying that it won't be fixed, coz you don't know (or dont want) how to set xdg data default path for Linux @eamodio see microsoft/vscode#162712, and |
I'm pretty sure that SQLTools follows the XDG spec, if you want VSCode-specific. Also, fwiw there's been a feedback suggestion for GitKraken itself to add XDG compliance since 2021. I'd honestly be okay with even just having a |
Can you share how you achieved that? |
I found this issue searching for what tool in 2024 could possibly have written a new folder in $HOME on my macOS machine. The standard by far is to use I am very disappointed to find that this isn't considered an issue and I'll simply stop using gitlens in VSCode. |
This is a deal breaker for me. If you don't start fixing it soon, I'm out. Programs that do not respect the XDG specification are an exception as you can see in this shrinking list of current and past offenders: https://wiki.archlinux.org/title/XDG_Base_Directory It was previously mentioned as a possible solution to use environment variables like |
Combined with some wrapper scripts to give things that do create dotfiles an alternate home folder (I use a very overengineered solution to this but just changing what |
Agreed, this is a bad convention. A lot of us version control the home folder or have scripts that run recursive actions on folders in $HOME on a cron/systemd. This creates more work. |
Hello from the Windows world. Clutter. I have to scroll to find my "Tools" directory, I even have %TOOLS% as a shortcut to skip this, the scrolling on my mouse has torn it old. Because .gitconfig, mercurial, the Bbash-4-Windows-dot-mess and their random configs everywhere, I somehow have .aws and some totally undecipherable .gk directory, with only hint is a json related to gitmapping, a need I presume, because another unrelated useless directory. You have %AppData% and %LocalAppData%, you even have the whole Windows Registry to hide in aswell, you also have %ProgramData%, i mean there are dead symlinks morphing into another language depending who "looks" at them, dangling and unclicable, because of options. I am not a daily linux driver, but I really, realllly do appreciate the XDG-env vars thingies, I can remap you - free to choose, free as in freedom to do what I want if it suits me. Now that I came here, I do know I have this extension. Lets imagine I feel the freedom to remove it, I assume your product will clean up, properly, like most serious Windows uninstallers? Anyway, I really just came here to say, stop this cluttering. Please have a nice week, and I will take my goodbye for now! |
It would be great for it to be in a XDG-compliant location on macOS too (which is what Git itself does). That said, I’m already going to be moving to Better Git Line Blame… this is just the thing that’s pushed me to fully uninstall GitLens. I’ve been working really hard to get all the dotfiles out of my top-level home directory, and it’s a bit frustrating to have another pop up, then have to track down where it’s coming from! It’s also particularly annoying in this case because |
Thank you! This is constructive! |
Just to chime in, I’m cleaning up my home folder today and wondering what the .gk and .gitkraken folders are that are junking up my home folder. Please follow xdg standards. You can move your config I’m sure. Pleaseee. |
Description
GitLens Version
v15.6.0
VS Code Version
Version: 1.94.0
Commit: d78a74bcdfad14d5d3b1b782f87255d802b57511
Date: 2024-10-02T13:08:12.626Z (6 days ago)
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.0.0
Git Version
git version 2.45.0
Logs, Screenshots, Screen Captures, etc
A
.gk
folder has started appearing in my home directory, containing arepoMapping.json
file. This seems to be due to:vscode-gitlens/src/env/node/pathMapping/sharedGKDataFolder.ts
Line 60 in b99d045
Creating a folder directly in the home dir is not a great practice. The appropriate thing would be to use the XDG conventions, possibly supplemented by platform-specific conventions.
VS Code may provide an API for this to extensions, else there are a bunch of libraries for this: https://www.npmjs.com/search?q=xdg
Alternatively, creating
repoMapping.json
inside e.g.~/.data/gitlens
would be much, much better than the current behaviour.The text was updated successfully, but these errors were encountered: