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/cli/handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/cli') diff --git a/internal/cli/handlers.go b/internal/cli/handlers.go index 02df7ae..44c64c6 100644 --- a/internal/cli/handlers.go +++ b/internal/cli/handlers.go @@ -69,7 +69,7 @@ func findDefaultConfigPath() string { // Check common config locations configLocations := []string{ filepath.Join(".", "gitsyncer.json"), - filepath.Join(home, ".config", "gitsyncer", "config.json"), + filepath.Join(home, ".config", "gitsyncer", "config"), filepath.Join(home, ".gitsyncer.json"), } @@ -88,7 +88,7 @@ func ShowConfigHelp() { fmt.Println("No configuration file found. Please create one of:") fmt.Printf(" - ./gitsyncer.json\n") - fmt.Printf(" - %s/.config/gitsyncer/config.json\n", home) + fmt.Printf(" - %s/.config/gitsyncer/config\n", home) fmt.Printf(" - %s/.gitsyncer.json\n", home) fmt.Println("\nOr specify a config file with --config flag") fmt.Println("\nExample configuration:") -- cgit v1.2.3