enhance: unchange global core.autocrlf is user do NOT set it yet (#297)

This commit is contained in:
leo 2024-07-30 09:52:34 +08:00
parent 5c6e4a5d48
commit 9aa5787ce9
No known key found for this signature in database

View file

@ -41,7 +41,7 @@ namespace SourceGit.Views
{ {
get; get;
set; set;
} = Models.CRLFMode.Supported[0]; } = null;
public static readonly StyledProperty<string> GitVersionProperty = public static readonly StyledProperty<string> GitVersionProperty =
AvaloniaProperty.Register<Preference, string>(nameof(GitVersion)); AvaloniaProperty.Register<Preference, string>(nameof(GitVersion));
@ -195,7 +195,7 @@ namespace SourceGit.Views
SetIfChanged(config, "user.name", DefaultUser); SetIfChanged(config, "user.name", DefaultUser);
SetIfChanged(config, "user.email", DefaultEmail); SetIfChanged(config, "user.email", DefaultEmail);
SetIfChanged(config, "user.signingkey", GPGUserKey); SetIfChanged(config, "user.signingkey", GPGUserKey);
SetIfChanged(config, "core.autocrlf", CRLFMode.Value); SetIfChanged(config, "core.autocrlf", CRLFMode != null ? CRLFMode.Value : null);
SetIfChanged(config, "commit.gpgsign", EnableGPGCommitSigning ? "true" : "false"); SetIfChanged(config, "commit.gpgsign", EnableGPGCommitSigning ? "true" : "false");
SetIfChanged(config, "tag.gpgsign", EnableGPGTagSigning ? "true" : "false"); SetIfChanged(config, "tag.gpgsign", EnableGPGTagSigning ? "true" : "false");
SetIfChanged(config, "gpg.format", GPGFormat.Value); SetIfChanged(config, "gpg.format", GPGFormat.Value);