From 735cbc11e1a3e103a69c03390b5f40ecc810dc9c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 13 Jul 2025 21:26:16 +0300 Subject: fix: update default config path to follow XDG Base Directory spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change default config from ~/.gitsyncer.json to ~/.config/gitsyncer/config - Update all documentation and help text to reflect new path - LoadConfig still checks common locations for backward compatibility: - ./gitsyncer.json - ~/.config/gitsyncer/config (new default) - ~/.gitsyncer.json This follows the XDG Base Directory specification for better organization of configuration files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/cmd/root.go | 2 +- internal/cmd/test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/cmd') diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 04ea6dd..927a9b8 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -53,7 +53,7 @@ func Execute() { func init() { // Global flags - rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "configuration file (default: ~/.gitsyncer.json)") + rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "configuration file (default: ~/.config/gitsyncer/config)") // Set default work directory home, err := os.UserHomeDir() diff --git a/internal/cmd/test.go b/internal/cmd/test.go index 0590719..2c50112 100644 --- a/internal/cmd/test.go +++ b/internal/cmd/test.go @@ -44,7 +44,7 @@ var testConfigCmd = &cobra.Command{ gitsyncer test config # Test specific config file - gitsyncer test config -c ~/my-gitsyncer.json`, + gitsyncer test config -c ~/my-config.json`, Run: func(cmd *cobra.Command, args []string) { // Try to load and validate config cfg, err := config.Load(cfgFile) -- cgit v1.2.3