Skip to content

Commit 0bb502c

Browse files
committed
Merge branch 'release/v8.35'
2 parents efc14fe + f633c52 commit 0bb502c

Some content is hidden

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

74 files changed

+1065
-368
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ For **macOS** users:
8181
* Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`.
8282
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your mac.
8383
* You may need to run `sudo xattr -cr /Applications/SourceGit.app` to make sure the software works.
84-
* You may need to start this app from commandline by using `open -a SourceGit` to introduce the `PATH` environment variable from your shell.
8584

8685
For **Linux** users:
8786

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.34
1+
8.35

screenshots/theme_dark.png

44.9 KB
Loading

screenshots/theme_light.png

-199 KB
Loading

src/Commands/Add.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ namespace SourceGit.Commands
55
{
66
public class Add : Command
77
{
8-
public Add(string repo, List<Models.Change> changes = null)
8+
public Add(string repo, bool includeUntracked)
9+
{
10+
WorkingDirectory = repo;
11+
Context = repo;
12+
Args = includeUntracked ? "add ." : "add -u .";
13+
}
14+
15+
public Add(string repo, List<Models.Change> changes)
916
{
1017
WorkingDirectory = repo;
1118
Context = repo;
1219

13-
if (changes == null || changes.Count == 0)
14-
{
15-
Args = "add .";
16-
}
17-
else
20+
var builder = new StringBuilder();
21+
builder.Append("add --");
22+
foreach (var c in changes)
1823
{
19-
var builder = new StringBuilder();
20-
builder.Append("add --");
21-
foreach (var c in changes)
22-
{
23-
builder.Append(" \"");
24-
builder.Append(c.Path);
25-
builder.Append("\"");
26-
}
27-
Args = builder.ToString();
24+
builder.Append(" \"");
25+
builder.Append(c.Path);
26+
builder.Append("\"");
2827
}
28+
Args = builder.ToString();
2929
}
3030
}
3131
}

src/Commands/CherryPick.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
{
33
public class CherryPick : Command
44
{
5-
public CherryPick(string repo, string commits, bool noCommit)
5+
public CherryPick(string repo, string commits, bool noCommit, bool appendSourceToMessage, string extraParams)
66
{
7-
var mode = noCommit ? "-n" : "--ff";
87
WorkingDirectory = repo;
98
Context = repo;
10-
Args = $"cherry-pick {mode} {commits}";
9+
10+
Args = "cherry-pick ";
11+
if (noCommit)
12+
Args += "-n ";
13+
if (appendSourceToMessage)
14+
Args += "-x ";
15+
if (!string.IsNullOrEmpty(extraParams))
16+
Args += $"{extraParams} ";
17+
Args += commits;
1118
}
1219
}
1320
}

src/Commands/Command.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,6 @@ private ProcessStartInfo CreateGitStartInfo()
195195
if (OperatingSystem.IsLinux())
196196
start.Environment.Add("LANG", "en_US.UTF-8");
197197

198-
// Fix sometimes `LSEnvironment` not working on macOS
199-
if (OperatingSystem.IsMacOS())
200-
{
201-
if (start.Environment.TryGetValue("PATH", out var path))
202-
start.Environment.Add("PATH", $"/opt/homebrew/bin:/opt/homebrew/sbin:{path}");
203-
else
204-
start.Environment.Add("PATH", "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin");
205-
}
206-
207198
// Force using this app as git editor.
208199
switch (Editor)
209200
{

src/Commands/Diff.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public Diff(string repo, Models.DiffOption opt, int unified, bool ignoreWhitespa
2424
Context = repo;
2525

2626
if (ignoreWhitespace)
27-
Args = $"diff --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}";
27+
Args = $"diff --patch --ignore-cr-at-eol --ignore-all-space --unified={unified} {opt}";
2828
else
29-
Args = $"diff --ignore-cr-at-eol --unified={unified} {opt}";
29+
Args = $"diff --patch --ignore-cr-at-eol --unified={unified} {opt}";
3030
}
3131

3232
public Models.DiffResult Result()

src/Commands/GC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public GC(string repo, Action<string> outputHandler)
1010
WorkingDirectory = repo;
1111
Context = repo;
1212
TraitErrorAsOutput = true;
13-
Args = "gc --prune";
13+
Args = "gc --prune=now";
1414
}
1515

1616
protected override void OnReadline(string line)

src/Commands/QueryBranches.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public QueryBranches(string repo)
1414
{
1515
WorkingDirectory = repo;
1616
Context = repo;
17-
Args = "branch -l --all -v --format=\"%(refname)$%(objectname)$%(HEAD)$%(upstream)$%(upstream:trackshort)\"";
17+
Args = "branch -l --all -v --format=\"%(refname)%00%(objectname)%00%(HEAD)%00%(upstream)%00%(upstream:trackshort)\"";
1818
}
1919

2020
public List<Models.Branch> Result()
@@ -37,7 +37,7 @@ public QueryBranches(string repo)
3737

3838
private Models.Branch ParseLine(string line)
3939
{
40-
var parts = line.Split('$');
40+
var parts = line.Split('\0');
4141
if (parts.Length != 5)
4242
return null;
4343

0 commit comments

Comments
 (0)