Skip to content

Commit 775e4cf

Browse files
committed
Merge branch 'release/v8.28'
2 parents cead681 + 050ce41 commit 775e4cf

File tree

96 files changed

+1880
-1428
lines changed

Some content is hidden

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

96 files changed

+1880
-1428
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Opensource Git GUI client.
77
* Supports Windows/macOS/Linux
88
* Opensource/Free
99
* Fast
10-
* English/German/Português/简体中文/繁體中文
10+
* English/Français/Deutsch/Português/简体中文/繁體中文
1111
* Built-in light/dark themes
1212
* Customize theme
1313
* Visual commit graph

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.27
1+
8.28

screenshots/theme_dark.png

430 KB
Loading

screenshots/theme_light.png

577 KB
Loading

src/App.Commands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public ParameterCommand(Action<object> action)
4343

4444
private Action<object> _action = null;
4545
}
46-
46+
4747
public static readonly SimpleCommand OpenPreferenceCommand = new SimpleCommand(() => OpenDialog(new Views.Preference()));
4848
public static readonly SimpleCommand OpenHotkeysCommand = new SimpleCommand(() => OpenDialog(new Views.Hotkeys()));
4949
public static readonly SimpleCommand OpenAppDataDirCommand = new SimpleCommand(() => Native.OS.OpenInFileManager(Native.OS.DataDir));

src/App.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
<Application.Styles>
2424
<FluentTheme />
25-
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
2625
<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
2726
<StyleInclude Source="/Resources/Styles.axaml"/>
2827
</Application.Styles>

src/App.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public override void OnFrameworkInitializationCompleted()
9898

9999
public static void OpenDialog(Window window)
100100
{
101-
if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner})
101+
if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
102102
window.ShowDialog(owner);
103103
}
104104

src/Commands/Checkout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public bool UseMine(List<string> files)
5858

5959
public bool FileWithRevision(string file, string revision)
6060
{
61-
Args = $"checkout {revision} -- \"{file}\"";
61+
Args = $"checkout --no-overlay {revision} -- \"{file}\"";
6262
return Exec();
6363
}
6464

src/Commands/CherryPick.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{
33
public class CherryPick : Command
44
{
5-
public CherryPick(string repo, string commit, bool noCommit)
5+
public CherryPick(string repo, string commits, bool noCommit)
66
{
77
var mode = noCommit ? "-n" : "--ff";
88
WorkingDirectory = repo;
99
Context = repo;
10-
Args = $"cherry-pick {mode} {commit}";
10+
Args = $"cherry-pick {mode} {commits}";
1111
}
1212
}
1313
}

src/Commands/Command.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ public class CancelToken
1717

1818
public class ReadToEndResult
1919
{
20-
public bool IsSuccess { get; set; }
21-
public string StdOut { get; set; }
20+
public bool IsSuccess { get; set; } = false;
21+
public string StdOut { get; set; } = "";
22+
public string StdErr { get; set; } = "";
2223
}
2324

2425
public enum EditorType
@@ -198,18 +199,20 @@ public ReadToEndResult ReadToEnd()
198199
{
199200
proc.Start();
200201
}
201-
catch
202+
catch (Exception e)
202203
{
203204
return new ReadToEndResult()
204205
{
205206
IsSuccess = false,
206207
StdOut = string.Empty,
208+
StdErr = e.Message,
207209
};
208210
}
209211

210212
var rs = new ReadToEndResult()
211213
{
212214
StdOut = proc.StandardOutput.ReadToEnd(),
215+
StdErr = proc.StandardError.ReadToEnd(),
213216
};
214217

215218
proc.WaitForExit();

src/Commands/QueryCommits.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,22 @@ public QueryCommits(string repo, string limits, bool needFindHead = true)
1414
_findFirstMerged = needFindHead;
1515
}
1616

17-
public QueryCommits(string repo, int maxCount, string messageFilter, bool isFile)
17+
public QueryCommits(string repo, string filter, Models.CommitSearchMethod method)
1818
{
1919
string search;
20-
if (isFile)
20+
21+
if (method == Models.CommitSearchMethod.ByUser)
22+
{
23+
search = $"-i --author=\"{filter}\" --committer=\"{filter}\"";
24+
}
25+
else if (method == Models.CommitSearchMethod.ByFile)
2126
{
22-
search = $"-- \"{messageFilter}\"";
27+
search = $"-- \"{filter}\"";
2328
}
2429
else
2530
{
2631
var argsBuilder = new StringBuilder();
27-
var words = messageFilter.Split(new[] { ' ', '\t', '\r' }, StringSplitOptions.RemoveEmptyEntries);
32+
var words = filter.Split(new[] { ' ', '\t', '\r' }, StringSplitOptions.RemoveEmptyEntries);
2833
foreach (var word in words)
2934
{
3035
var escaped = word.Trim().Replace("\"", "\\\"", StringComparison.Ordinal);
@@ -36,7 +41,7 @@ public QueryCommits(string repo, int maxCount, string messageFilter, bool isFile
3641

3742
WorkingDirectory = repo;
3843
Context = repo;
39-
Args = $"log -{maxCount} --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s --branches --remotes " + search;
44+
Args = $"log -1000 --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s --branches --remotes " + search;
4045
_findFirstMerged = false;
4146
}
4247

src/Commands/QueryRepositoryRootPath.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ public QueryRepositoryRootPath(string path)
66
{
77
WorkingDirectory = path;
88
Args = "rev-parse --show-toplevel";
9-
RaiseError = false;
10-
}
11-
12-
public string Result()
13-
{
14-
var rs = ReadToEnd().StdOut;
15-
if (string.IsNullOrEmpty(rs))
16-
return null;
17-
return rs.Trim();
189
}
1910
}
2011
}

src/Commands/QuerySingleCommit.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32

43
namespace SourceGit.Commands
54
{

src/Commands/Statistics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public Statistics(string repo)
1010

1111
WorkingDirectory = repo;
1212
Context = repo;
13-
Args = $"log --date-order --branches --remotes --since=\"{_statistics.Since()}\" --pretty=format:\"%ct$%cn\"";
13+
Args = $"log --date-order --branches --remotes --since=\"{_statistics.Since()}\" --pretty=format:\"%ct$%an\"";
1414
}
1515

1616
public Models.Statistics Result()

src/Models/Commit.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
namespace SourceGit.Models
88
{
9+
public enum CommitSearchMethod
10+
{
11+
ByUser,
12+
ByMessage,
13+
ByFile,
14+
}
15+
916
public class Commit
1017
{
1118
public static double OpacityForNotMerged

src/Models/CommitGraph.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
191191
}
192192

193193
isMerged = isMerged || l.IsMerged;
194+
major.IsMerged = isMerged;
194195
}
195196
else
196197
{
@@ -202,12 +203,17 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
202203
}
203204

204205
// Create new curve for branch head
205-
if (major == null && commit.Parents.Count > 0)
206+
if (major == null)
206207
{
207208
offsetX += UNIT_WIDTH;
208-
major = new PathHelper(commit.Parents[0], isMerged, colorIdx, new Point(offsetX, offsetY));
209-
unsolved.Add(major);
210-
temp.Paths.Add(major.Path);
209+
210+
if (commit.Parents.Count > 0)
211+
{
212+
major = new PathHelper(commit.Parents[0], isMerged, colorIdx, new Point(offsetX, offsetY));
213+
unsolved.Add(major);
214+
temp.Paths.Add(major.Path);
215+
}
216+
211217
colorIdx = (colorIdx + 1) % _penCount;
212218
}
213219

@@ -216,11 +222,9 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
216222
int dotColor = 0;
217223
if (major != null)
218224
{
219-
major.IsMerged = isMerged;
220225
position = new Point(major.LastX, offsetY);
221226
dotColor = major.Path.Color;
222227
}
223-
224228
Dot anchor = new Dot() { Center = position, Color = dotColor };
225229
if (commit.IsCurrentHead)
226230
anchor.Type = DotType.Head;
@@ -271,7 +275,7 @@ public static CommitGraph Parse(List<Commit> commits, bool firstParentOnlyEnable
271275
unsolved.Remove(l);
272276
}
273277

274-
// Margins & merge state (used by datagrid).
278+
// Margins & merge state (used by Views.Histories).
275279
commit.IsMerged = isMerged;
276280
commit.Margin = new Thickness(Math.Max(offsetX + HALF_WIDTH, oldCount * UNIT_WIDTH + H_MARGIN) + H_MARGIN, 0, 0, 0);
277281

0 commit comments

Comments
 (0)