{"thread":{"id":"60507","subject":"Declutter the home directory","startedAt":"2023-11-12T13:32:01Z","lastAt":"2023-11-12T13:39:14Z","messageCount":2,"participants":["Félix Piédallu","Dragan Simic"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"484772","messageId":"cb89d863-12d4-412b-a25b-9eedce996708@piedallu.me","threadId":"60507","inReplyTo":null,"subject":"Declutter the home directory","fromName":"Félix Piédallu","fromEmail":"felix@piedallu.me","sentAt":"2023-11-12T12:10:41Z","receivedAt":"2023-11-12T13:32:01Z","isPatch":false,"sender":{"key":"felix@piedallu.me","avatar":null},"body":"Hi,\nI'm new on this mailing list so please tell me if the subject was \nalready discussed.\n\nThe Freedesktop XDG Base Directory specification \n(https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) \naims to declutter the home directory by moving files where they should \nbe more logically located. Here i'll be talking about some directories:\n\n* $XDG_CACHE_HOME, that defaults to the well-known $HOME/.cache\n* $XDG_CONFIG_HOME, that defaults to the also well known $HOME/.config\n* $XDG_RUNTIME_DIR, that should contain non-essential runtime files\n   such as socket files\n\nFor now 4 kind of files are put in the $HOME directory by git:\n\n* .gitconfig | .config/git/config\n   it defaults to .gitconfig\n\n* .git-credentials | .config/git/credentials from the credential-store\n   it also defaults to .git-credentials\n\n* .cache/git/credentials | .git-credential-cache/ from credential-cache\n   this one defaults to .cache/git/credentials/\n\n* .git-fsmonitor-%s for Darwin file system monitor.\n\n\nI have 3 propositions:\n\n## Move runtimes files to $XDG_RUNTIME_DIR\n\n* .cache/git/credential/ -> $XDG_RUNTIME_DIR/git/credential/\n* .git-fsmonitor-%s -> $XDG_RUNTIME_DIR/git/fsmonitor/%s\n\nThose file shall be deleted at the end of the user session, so this is\nthe good place to store them.\n\n\n## Move ~/.config/git/credentials to ~/.cache/git/credentials\n\nIndeed this might contain sensitive information that some users don't \nwant to be backed up or synchronized.\nA possibility would be to read ~/.cache/git/credentials, \n~/.config/git/credentials, ~/.git-credentials, and to use the first \nexisting one.\n\n\n## Default to XDG paths instead of home directory\n\nIt would just swap the priority of the two possible paths. It would also \nonly impact new installations as, if ~/.gitconfig exists, it would keep \nbeing used.\n\n\n\nThe goal of those propositions is to declutter the home directory, and\nease the cleanup, backup and synchronisation of user settings.\n\n\nThanks for reading me.\n\nFélix Piédallu\n"},{"id":"484773","messageId":"4023bded47a39e10f28e30efad9c34d4@manjaro.org","threadId":"60507","inReplyTo":"cb89d863-12d4-412b-a25b-9eedce996708@piedallu.me","subject":"Re: Declutter the home directory","fromName":"Dragan Simic","fromEmail":"dsimic@manjaro.org","sentAt":"2023-11-12T13:39:10Z","receivedAt":"2023-11-12T13:39:14Z","isPatch":false,"sender":{"key":"dsimic@manjaro.org","avatar":null},"body":"On 2023-11-12 13:10, Félix Piédallu wrote:\n> ## Default to XDG paths instead of home directory\n> \n> It would just swap the priority of the two possible paths. It would\n> also only impact new installations as, if ~/.gitconfig exists, it\n> would keep being used.\n\nQuite frankly, some configuration files should remain in $HOME, and \n~/.gitconfig is IMHO one of those.  It's used very frequently, not only \ndirectly, but also while discussing or explaining various configuration \nfeatures or issues.  Thus, moving it somewhere else would only make \nthings more complicated and worse.\n\nIOW, I think that the order/priority shouldn't be changed.\n"}]}