refactor: rewrite git apply implementation

- Do not translate commandline options for `git`
- Re-design combox layout for `git apply` popup

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-17 15:30:32 +08:00
parent ddfc868df3
commit cdd1926e2f
No known key found for this signature in database
12 changed files with 36 additions and 99 deletions

View file

@ -2,14 +2,22 @@
{
public class ApplyWhiteSpaceMode
{
public static readonly ApplyWhiteSpaceMode[] Supported =
[
new ApplyWhiteSpaceMode("No Warn", "Turns off the trailing whitespace warning", "nowarn"),
new ApplyWhiteSpaceMode("Warn", "Outputs warnings for a few such errors, but applies", "warn"),
new ApplyWhiteSpaceMode("Error", "Raise errors and refuses to apply the patch", "error"),
new ApplyWhiteSpaceMode("Error All", "Similar to 'error', but shows more", "error-all"),
];
public string Name { get; set; }
public string Desc { get; set; }
public string Arg { get; set; }
public ApplyWhiteSpaceMode(string n, string d, string a)
{
Name = App.Text(n);
Desc = App.Text(d);
Name = n;
Desc = d;
Arg = a;
}
}