just playing with tangled

config: do not warn about deprecated path if manually configured

authored by Josep Mengual and committed by Austin Seipp c732472f a44c413d

Changed files
+22
cli
+3
CHANGELOG.md
··· 79 79 * `jj parallelize` can now parallelize groups of changes that _start_ with an 80 80 immutable change, but do not contain any other immutable changes. 81 81 82 + * `jj` will no longer warn about deprecated paths on macOS if the configured 83 + XDG directory is the deprecated one (~/Library/Application Support). 84 + 82 85 ### Packaging changes 83 86 84 87 * Due to the removal of the `libgit2` code path, packagers should
+4
cli/src/config.rs
··· 347 347 // Library/Preferences is supposed to be exclusively plists 348 348 s.data_dir() 349 349 }) 350 + .filter(|data_dir| { 351 + // User might've purposefully set their config dir to the deprecated one 352 + Some(data_dir) != config_dir.as_ref() 353 + }) 350 354 } else { 351 355 None 352 356 };
+15
cli/tests/test_config_command.rs
··· 978 978 [EOF] 979 979 "); 980 980 981 + // if XDG_CONFIG_HOME is ~/Library/Application Support, 982 + // you shouldn't get a warning 983 + let output = test_env.run_jj_with(|cmd| { 984 + cmd.env_remove("JJ_CONFIG") 985 + .env( 986 + "XDG_CONFIG_HOME", 987 + test_env.home_dir().join("Library/Application Support"), 988 + ) 989 + .args(["config", "get", "foo.bar"]) 990 + }); 991 + insta::assert_snapshot!(output, @r" 992 + Make sure I can pick this up 993 + [EOF] 994 + "); 995 + 981 996 // if you set JJ_CONFIG, you shouldn't get a warning 982 997 let output = test_env.run_jj_with(|cmd| { 983 998 cmd.env("JJ_CONFIG", &user_config_path)