mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
style: add .editorconfig for code formatting. see issu #25
This commit is contained in:
parent
a8eeea4f78
commit
18aaa0a143
225 changed files with 7781 additions and 3911 deletions
|
@ -1,8 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SourceGit.Models {
|
||||
public class ExternalMergeTools {
|
||||
namespace SourceGit.Models
|
||||
{
|
||||
public class ExternalMergeTools
|
||||
{
|
||||
public int Type { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Exec { get; set; }
|
||||
|
@ -11,8 +13,10 @@ namespace SourceGit.Models {
|
|||
|
||||
public static List<ExternalMergeTools> Supported;
|
||||
|
||||
static ExternalMergeTools() {
|
||||
if (OperatingSystem.IsWindows()) {
|
||||
static ExternalMergeTools()
|
||||
{
|
||||
if (OperatingSystem.IsWindows())
|
||||
{
|
||||
Supported = new List<ExternalMergeTools>() {
|
||||
new ExternalMergeTools(0, "Custom", "", "", ""),
|
||||
new ExternalMergeTools(1, "Visual Studio Code", "Code.exe", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\""),
|
||||
|
@ -22,7 +26,9 @@ namespace SourceGit.Models {
|
|||
new ExternalMergeTools(5, "Beyond Compare 4", "BComp.exe", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""),
|
||||
new ExternalMergeTools(6, "WinMerge", "WinMergeU.exe", "-u -e \"$REMOTE\" \"$LOCAL\" \"$MERGED\"", "-u -e \"$LOCAL\" \"$REMOTE\""),
|
||||
};
|
||||
} else if (OperatingSystem.IsMacOS()) {
|
||||
}
|
||||
else if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
Supported = new List<ExternalMergeTools>() {
|
||||
new ExternalMergeTools(0, "Custom", "", "", ""),
|
||||
new ExternalMergeTools(1, "FileMerge", "/usr/bin/opendiff", "\"$BASE\" \"$LOCAL\" \"$REMOTE\" -ancestor \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""),
|
||||
|
@ -30,21 +36,26 @@ namespace SourceGit.Models {
|
|||
new ExternalMergeTools(3, "KDiff3", "/Applications/kdiff3.app/Contents/MacOS/kdiff3", "\"$REMOTE\" -b \"$BASE\" \"$LOCAL\" -o \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""),
|
||||
new ExternalMergeTools(4, "Beyond Compare 4", "/Applications/Beyond Compare.app/Contents/MacOS/bcomp", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""),
|
||||
};
|
||||
} else if (OperatingSystem.IsLinux()) {
|
||||
}
|
||||
else if (OperatingSystem.IsLinux())
|
||||
{
|
||||
Supported = new List<ExternalMergeTools>() {
|
||||
new ExternalMergeTools(0, "Custom", "", "", ""),
|
||||
new ExternalMergeTools(1, "Visual Studio Code", "/usr/share/code/code", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\""),
|
||||
new ExternalMergeTools(2, "KDiff3", "/usr/bin/kdiff3", "\"$REMOTE\" -b \"$BASE\" \"$LOCAL\" -o \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""),
|
||||
new ExternalMergeTools(3, "Beyond Compare 4", "/usr/bin/bcomp", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\""),
|
||||
};
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
Supported = new List<ExternalMergeTools>() {
|
||||
new ExternalMergeTools(0, "Custom", "", "", ""),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public ExternalMergeTools(int type, string name, string exec, string cmd, string diffCmd) {
|
||||
public ExternalMergeTools(int type, string name, string exec, string cmd, string diffCmd)
|
||||
{
|
||||
Type = type;
|
||||
Name = name;
|
||||
Exec = exec;
|
||||
|
@ -52,4 +63,4 @@ namespace SourceGit.Models {
|
|||
DiffCmd = diffCmd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue