Skip to content

Commit e9c65d6

Browse files
committed
Merge branch 'release/v8.8'
2 parents 8f70778 + f3532c4 commit e9c65d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+833
-481
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Continuous Integration
22
on:
33
push:
44
branches:
5-
- master
5+
- develop
66
pull_request:
7-
branches: [master]
7+
branches: [develop]
88
workflow_dispatch:
99
jobs:
1010
build:

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ You can download the latest stable from [Releases](https://github.com/sourcegit-
3737
For **Windows** users:
3838

3939
* **MSYS Git is NOT supported**. Please use official [Git for Windows](https://git-scm.com/download/win) instead.
40+
* `Source.win-x64.zip` may be reported as virus by Windows Defender. I don't know why. I have manually tested the zip to be uploaded using Windows Defender before uploading and no virus was found. If you have installed .NET 8 SDK locally, I suggest you to compile it yourself. And if you have any idea about how to fix this, please open an issue.
4041

4142
For **macOS** users:
4243

@@ -53,20 +54,20 @@ For **Linux** users:
5354
* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI.
5455
* Modify `SourceGit.desktop.template` (replace SOURCEGIT_LOCAL_FOLDER with real path) and move it into `~/.local/share/applications`.
5556

56-
## External Editors
57+
## External Tools
5758

58-
This app supports open repository in external editors listed in the table below.
59+
This app supports open repository in external tools listed in the table below.
5960

60-
| Editor | Windows | macOS | Linux | Environment Variable |
61+
| Tool | Windows | macOS | Linux | Environment Variable |
6162
| --- | --- | --- | --- | --- |
6263
| Visual Studio Code | YES | YES | YES | VSCODE_PATH |
6364
| Visual Studio Code - Insiders | YES | YES | YES | VSCODE_INSIDERS_PATH |
6465
| JetBrains Fleet | YES | YES | YES | FLEET_PATH |
6566
| Sublime Text | YES | YES | YES | SUBLIME_TEXT_PATH |
6667

67-
You can set the given environment variable for special editor if it can NOT be found by this app automatically.
68+
You can set the given environment variable for special tool if it can NOT be found by this app automatically.
6869

69-
## Screen Shots
70+
## Screenshots
7071

7172
* Dark Theme
7273

build/resources/App.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<key>CFBundleName</key>
1010
<string>SourceGit</string>
1111
<key>CFBundleVersion</key>
12-
<string>8.7.0</string>
12+
<string>8.8.0</string>
1313
<key>LSMinimumSystemVersion</key>
1414
<string>10.12</string>
1515
<key>CFBundleExecutable</key>
@@ -19,8 +19,8 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>8.7</string>
22+
<string>8.8</string>
2323
<key>NSHighResolutionCapable</key>
2424
<true/>
2525
</dict>
26-
</plist>
26+
</plist>

src/Commands/Checkout.cs

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,31 @@ public bool Branch(string branch, string basedOn, Action<string> onProgress)
2828
return Exec();
2929
}
3030

31-
public bool File(string file, bool useTheirs)
31+
public bool UseTheirs(List<string> files)
3232
{
33-
if (useTheirs)
33+
StringBuilder builder = new StringBuilder();
34+
builder.Append("checkout --theirs --");
35+
foreach (var f in files)
3436
{
35-
Args = $"checkout --theirs -- \"{file}\"";
37+
builder.Append(" \"");
38+
builder.Append(f);
39+
builder.Append("\"");
3640
}
37-
else
41+
Args = builder.ToString();
42+
return Exec();
43+
}
44+
45+
public bool UseMine(List<string> files)
46+
{
47+
StringBuilder builder = new StringBuilder();
48+
builder.Append("checkout --ours --");
49+
foreach (var f in files)
3850
{
39-
Args = $"checkout --ours -- \"{file}\"";
51+
builder.Append(" \"");
52+
builder.Append(f);
53+
builder.Append("\"");
4054
}
41-
55+
Args = builder.ToString();
4256
return Exec();
4357
}
4458

src/Commands/Diff.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ public Models.DiffResult Result()
4646

4747
protected override void OnReadline(string line)
4848
{
49+
if (line.StartsWith("old mode ", StringComparison.Ordinal))
50+
{
51+
_result.OldMode = line.Substring(9);
52+
return;
53+
}
54+
55+
if (line.StartsWith("new mode ", StringComparison.Ordinal))
56+
{
57+
_result.NewMode = line.Substring(9);
58+
return;
59+
}
60+
4961
if (_result.IsBinary)
5062
return;
5163

src/Commands/Fetch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public Fetch(string repo, string remote, bool prune, Action<string> outputHandle
2424
Args = "-c credential.helper=manager ";
2525
}
2626

27-
Args += "fetch --progress --verbose ";
27+
Args += "fetch --force --progress --verbose ";
2828
if (prune)
2929
Args += "--prune ";
3030
Args += remote;

src/Commands/QueryCommitChanges.cs

Lines changed: 0 additions & 61 deletions
This file was deleted.

src/Converters/ListConverters.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace SourceGit.Converters
77
public static class ListConverters
88
{
99
public static readonly FuncValueConverter<IList, string> ToCount =
10-
new FuncValueConverter<IList, string>(v => $" ({v.Count})");
10+
new FuncValueConverter<IList, string>(v => v == null ? " (0)" : $" ({v.Count})");
1111

1212
public static readonly FuncValueConverter<IList, bool> IsNotNullOrEmpty =
1313
new FuncValueConverter<IList, bool>(v => v != null && v.Count > 0);

src/Converters/PathConverters.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,5 @@ public static class PathConverters
1111

1212
public static readonly FuncValueConverter<string, string> PureDirectoryName =
1313
new FuncValueConverter<string, string>(fullpath => Path.GetDirectoryName(fullpath) ?? "");
14-
15-
public static readonly FuncValueConverter<string, string> TruncateIfTooLong =
16-
new FuncValueConverter<string, string>(fullpath =>
17-
{
18-
if (fullpath.Length <= 50)
19-
return fullpath;
20-
return fullpath.Substring(0, 20) + ".../" + Path.GetFileName(fullpath);
21-
});
2214
}
2315
}

src/Models/DiffResult.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,21 @@ public class NoOrEOLChange
576576
{
577577
}
578578

579+
public class FileModeDiff
580+
{
581+
public string Old { get; set; } = string.Empty;
582+
public string New { get; set; } = string.Empty;
583+
}
584+
579585
public class DiffResult
580586
{
581587
public bool IsBinary { get; set; } = false;
582588
public bool IsLFS { get; set; } = false;
589+
public string OldMode { get; set; } = string.Empty;
590+
public string NewMode { get; set; } = string.Empty;
583591
public TextDiff TextDiff { get; set; } = null;
584592
public LFSDiff LFSDiff { get; set; } = null;
593+
594+
public string FileModeChange => string.IsNullOrEmpty(OldMode) ? string.Empty : $"{OldMode}{NewMode}";
585595
}
586596
}

0 commit comments

Comments
 (0)