Skip to content

Commit efc14fe

Browse files
committed
Merge branch 'release/v8.34'
2 parents af888e1 + 49e769b commit efc14fe

37 files changed

+323
-145
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Opensource Git GUI client.
3131
* Revision Diffs
3232
* Branch Diff
3333
* Image Diff - Side-By-Side/Swipe/Blend
34+
* Search commits
3435
* GitFlow
3536
* Git LFS
3637
* Issue Link
@@ -80,6 +81,7 @@ For **macOS** users:
8081
* Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`.
8182
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your mac.
8283
* 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.
8385

8486
For **Linux** users:
8587

VERSION

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

src/Commands/Command.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,18 +188,21 @@ private ProcessStartInfo CreateGitStartInfo()
188188
start.Environment.Add("SOURCEGIT_LAUNCH_AS_ASKPASS", "TRUE");
189189

190190
// If an SSH private key was provided, sets the environment.
191-
if (!string.IsNullOrEmpty(SSHKey))
192-
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -o StrictHostKeyChecking=accept-new -i '{SSHKey}'");
193-
else
194-
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -o StrictHostKeyChecking=accept-new");
191+
if (!start.Environment.ContainsKey("GIT_SSH_COMMAND") && !string.IsNullOrEmpty(SSHKey))
192+
start.Environment.Add("GIT_SSH_COMMAND", $"ssh -i '{SSHKey}'");
195193

196194
// Force using en_US.UTF-8 locale to avoid GCM crash
197195
if (OperatingSystem.IsLinux())
198196
start.Environment.Add("LANG", "en_US.UTF-8");
199197

200198
// Fix sometimes `LSEnvironment` not working on macOS
201199
if (OperatingSystem.IsMacOS())
202-
start.Environment.Add("PATH", "/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin");
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+
}
203206

204207
// Force using this app as git editor.
205208
switch (Editor)

src/Commands/Config.cs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@ public class Config : Command
77
{
88
public Config(string repository)
99
{
10-
WorkingDirectory = repository;
11-
Context = repository;
10+
if (string.IsNullOrEmpty(repository))
11+
{
12+
WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
13+
}
14+
else
15+
{
16+
WorkingDirectory = repository;
17+
Context = repository;
18+
_isLocal = true;
19+
}
20+
1221
RaiseError = false;
1322
}
1423

1524
public Dictionary<string, string> ListAll()
1625
{
17-
if (string.IsNullOrEmpty(WorkingDirectory))
18-
Args = "config --global -l";
19-
else
20-
Args = "config -l";
26+
Args = "config -l";
2127

2228
var output = ReadToEnd();
2329
var rs = new Dictionary<string, string>();
@@ -47,22 +53,16 @@ public string Get(string key)
4753

4854
public bool Set(string key, string value, bool allowEmpty = false)
4955
{
56+
var scope = _isLocal ? "--local" : "--global";
57+
5058
if (!allowEmpty && string.IsNullOrWhiteSpace(value))
51-
{
52-
if (string.IsNullOrEmpty(WorkingDirectory))
53-
Args = $"config --global --unset {key}";
54-
else
55-
Args = $"config --unset {key}";
56-
}
59+
Args = $"config {scope} --unset {key}";
5760
else
58-
{
59-
if (string.IsNullOrWhiteSpace(WorkingDirectory))
60-
Args = $"config --global {key} \"{value}\"";
61-
else
62-
Args = $"config {key} \"{value}\"";
63-
}
61+
Args = $"config {scope} {key} \"{value}\"";
6462

6563
return Exec();
6664
}
65+
66+
private bool _isLocal = false;
6767
}
6868
}

src/Commands/Remote.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,17 @@ public bool Prune(string name)
3232
return Exec();
3333
}
3434

35-
public bool SetURL(string name, string url)
35+
public string GetURL(string name, bool isPush)
3636
{
37-
Args = $"remote set-url {name} {url}";
37+
Args = "remote get-url" + (isPush ? " --push " : " ") + name;
38+
39+
var rs = ReadToEnd();
40+
return rs.IsSuccess ? rs.StdOut.Trim() : string.Empty;
41+
}
42+
43+
public bool SetURL(string name, string url, bool isPush)
44+
{
45+
Args = "remote set-url" + (isPush ? " --push " : " ") + $"{name} {url}";
3846
return Exec();
3947
}
4048
}

src/Commands/Tag.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static bool Add(string repo, string name, string basedOn)
1616

1717
public static bool Add(string repo, string name, string basedOn, string message, bool sign)
1818
{
19-
var param = sign ? "-s -a" : "-a";
19+
var param = sign ? "--sign -a" : "--no-sign -a";
2020
var cmd = new Command();
2121
cmd.WorkingDirectory = repo;
2222
cmd.Context = repo;

src/Models/TextMateHelper.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ private record ExtraGrammar(string Scope, string Extension, string File)
8181

8282
public class RegistryOptionsWrapper(ThemeName defaultTheme) : IRegistryOptions
8383
{
84+
public string LastScope { get; set; } = string.Empty;
85+
8486
public IRawTheme GetTheme(string scopeName) => _backend.GetTheme(scopeName);
8587
public IRawTheme GetDefaultTheme() => _backend.GetDefaultTheme();
8688
public IRawTheme LoadTheme(ThemeName name) => _backend.LoadTheme(name);
@@ -111,10 +113,15 @@ public static void SetThemeByApp(TextMate.Installation installation)
111113

112114
public static void SetGrammarByFileName(TextMate.Installation installation, string filePath)
113115
{
114-
if (installation is { RegistryOptions: RegistryOptionsWrapper reg })
116+
if (installation is { RegistryOptions: RegistryOptionsWrapper reg } && !string.IsNullOrEmpty(filePath))
115117
{
116-
installation.SetGrammar(reg.GetScope(filePath));
117-
GC.Collect();
118+
var scope = reg.GetScope(filePath);
119+
if (reg.LastScope != scope)
120+
{
121+
reg.LastScope = scope;
122+
installation.SetGrammar(reg.GetScope(filePath));
123+
GC.Collect();
124+
}
118125
}
119126
}
120127
}

src/Resources/Locales/de_DE.axaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
<x:String x:Key="Text.Configure.Git" xml:space="preserve">GIT</x:String>
142142
<x:String x:Key="Text.Configure.Git.AutoFetch" xml:space="preserve">Remotes automatisch fetchen</x:String>
143143
<x:String x:Key="Text.Configure.Git.AutoFetchIntervalSuffix" xml:space="preserve">Minute(n)</x:String>
144+
<x:String x:Key="Text.Configure.Git.DefaultRemote" xml:space="preserve">Standard Remote</x:String>
144145
<x:String x:Key="Text.Configure.IssueTracker" xml:space="preserve">TICKETSYSTEM</x:String>
145146
<x:String x:Key="Text.Configure.IssueTracker.AddSampleGithub" xml:space="preserve">Beispiel für Github-Regel hinzufügen</x:String>
146147
<x:String x:Key="Text.Configure.IssueTracker.AddSampleJira" xml:space="preserve">Beispiel für Jira-Regel hinzufügen</x:String>
@@ -206,6 +207,7 @@
206207
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">ALT</x:String>
207208
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">Kopieren</x:String>
208209
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">Dateimodus geändert</x:String>
210+
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">Ignoriere Leerzeichenänderungen</x:String>
209211
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJEKT ÄNDERUNG</x:String>
210212
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Nächste Änderung</x:String>
211213
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">KEINE ÄNDERUNG ODER NUR ZEILEN-ENDE ÄNDERUNGEN</x:String>
@@ -225,6 +227,7 @@
225227
<x:String x:Key="Text.Discard" xml:space="preserve">Änderungen verwerfen</x:String>
226228
<x:String x:Key="Text.Discard.All" xml:space="preserve">Alle Änderungen in der Arbeitskopie.</x:String>
227229
<x:String x:Key="Text.Discard.Changes" xml:space="preserve">Änderungen:</x:String>
230+
<x:String x:Key="Text.Discard.IncludeIgnored" xml:space="preserve">Ignorierte Dateien inkludieren</x:String>
228231
<x:String x:Key="Text.Discard.Total" xml:space="preserve">Insgesamt {0} Änderungen werden verworfen</x:String>
229232
<x:String x:Key="Text.Discard.Warning" xml:space="preserve">Du kannst das nicht rückgängig machen!!!</x:String>
230233
<x:String x:Key="Text.EditRepositoryNode.Bookmark" xml:space="preserve">Lesezeichen:</x:String>
@@ -330,6 +333,7 @@
330333
<x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String>
331334
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Gestagte Änderungen committen</x:String>
332335
<x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Gestagte Änderungen committen und pushen</x:String>
336+
<x:String x:Key="Text.Hotkeys.Repo.CommitWithAutoStage" xml:space="preserve">Alle Änderungen stagen und committen</x:String>
333337
<x:String x:Key="Text.Hotkeys.Repo.DiscardSelected" xml:space="preserve">Ausgewählte Änderungen verwerfen</x:String>
334338
<x:String x:Key="Text.Hotkeys.Repo.GoHome" xml:space="preserve">Dashboard Modus (Standard)</x:String>
335339
<x:String x:Key="Text.Hotkeys.Repo.Refresh" xml:space="preserve">Erzwinge Neuladen des Repositorys</x:String>
@@ -355,8 +359,6 @@
355359
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interaktiver Rebase</x:String>
356360
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ziel Branch:</x:String>
357361
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Auf:</x:String>
358-
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Hochschieben</x:String>
359-
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Runterschieben</x:String>
360362
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
361363
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">FEHLER</x:String>
362364
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">INFO</x:String>
@@ -499,7 +501,7 @@
499501
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Repository Einstellungen</x:String>
500502
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">WEITER</x:String>
501503
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Öffne im Datei-Browser</x:String>
502-
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Suche Branches &amp; Tags &amp; Submodule</x:String>
504+
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Suche Branches/Tags/Submodule</x:String>
503505
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">GEFILTERT:</x:String>
504506
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOKALE BRANCHES</x:String>
505507
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Zum HEAD wechseln</x:String>
@@ -516,6 +518,7 @@
516518
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String>
517519
<x:String x:Key="Text.Repository.Search.BySHA" xml:space="preserve">SHA</x:String>
518520
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Autor &amp; Committer</x:String>
521+
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">Aktueller Branch</x:String>
519522
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Zeige Tags als Baum</x:String>
520523
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistiken</x:String>
521524
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULE</x:String>
@@ -623,6 +626,8 @@
623626
<x:String x:Key="Text.WorkingCopy.Commit" xml:space="preserve">COMMIT</x:String>
624627
<x:String x:Key="Text.WorkingCopy.CommitAndPush" xml:space="preserve">COMMIT &amp; PUSH</x:String>
625628
<x:String x:Key="Text.WorkingCopy.CommitMessageHelper" xml:space="preserve">Template/Historie</x:String>
629+
<x:String x:Key="Text.WorkingCopy.CommitTip" xml:space="preserve">Klick-Ereignis auslösen</x:String>
630+
<x:String x:Key="Text.WorkingCopy.CommitWithAutoStage" xml:space="preserve">Alle Änderungen stagen und committen</x:String>
626631
<x:String x:Key="Text.WorkingCopy.Conflicts" xml:space="preserve">KONFLIKTE ERKANNT</x:String>
627632
<x:String x:Key="Text.WorkingCopy.Conflicts.Resolved" xml:space="preserve">DATEI KONFLIKTE GELÖST</x:String>
628633
<x:String x:Key="Text.WorkingCopy.IncludeUntracked" xml:space="preserve">NICHT-VERFOLGTE DATEIEN INKLUDIEREN</x:String>

src/Resources/Locales/en_US.axaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<x:String x:Key="Text.About" xml:space="preserve">About</x:String>
33
<x:String x:Key="Text.About.Menu" xml:space="preserve">About SourceGit</x:String>
44
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Build with </x:String>
5+
<x:String x:Key="Text.About.Chart" xml:space="preserve">• Chart is rendered by </x:String>
56
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
67
<x:String x:Key="Text.About.Editor" xml:space="preserve">• TextEditor from </x:String>
78
<x:String x:Key="Text.About.Fonts" xml:space="preserve">• Monospace fonts come from </x:String>
@@ -313,6 +314,7 @@
313314
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Switch Horizontal/Vertical Layout</x:String>
314315
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Switch Curve/Polyline Graph Mode</x:String>
315316
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTHOR</x:String>
317+
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">AUTHOR TIME</x:String>
316318
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRAPH &amp; SUBJECT</x:String>
317319
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
318320
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">COMMIT TIME</x:String>
@@ -356,8 +358,6 @@
356358
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String>
357359
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String>
358360
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String>
359-
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Move Up</x:String>
360-
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Move Down</x:String>
361361
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
362362
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERROR</x:String>
363363
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">NOTICE</x:String>
@@ -414,6 +414,7 @@
414414
<x:String x:Key="Text.Preference.General.Check4UpdatesOnStartup" xml:space="preserve">Check for updates on startup</x:String>
415415
<x:String x:Key="Text.Preference.General.Locale" xml:space="preserve">Language</x:String>
416416
<x:String x:Key="Text.Preference.General.MaxHistoryCommits" xml:space="preserve">History Commits</x:String>
417+
<x:String x:Key="Text.Preference.General.ShowAuthorTime" xml:space="preserve">Show author time intead of commit time in graph</x:String>
417418
<x:String x:Key="Text.Preference.General.SubjectGuideLength" xml:space="preserve">Subject Guide Length</x:String>
418419
<x:String x:Key="Text.Preference.Git" xml:space="preserve">GIT</x:String>
419420
<x:String x:Key="Text.Preference.Git.CRLF" xml:space="preserve">Enable Auto CRLF</x:String>
@@ -500,7 +501,7 @@
500501
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
501502
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
502503
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open In File Browser</x:String>
503-
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches &amp; Tags &amp; Submodules</x:String>
504+
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String>
504505
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
505506
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
506507
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>
@@ -562,6 +563,8 @@
562563
<x:String x:Key="Text.Stash.IncludeUntracked" xml:space="preserve">Include untracked files</x:String>
563564
<x:String x:Key="Text.Stash.Message" xml:space="preserve">Message:</x:String>
564565
<x:String x:Key="Text.Stash.Message.Placeholder" xml:space="preserve">Optional. Name of this stash</x:String>
566+
<x:String x:Key="Text.Stash.OnlyStagedChanges" xml:space="preserve">Only staged changes</x:String>
567+
<x:String x:Key="Text.Stash.TipForSelectedFiles" xml:space="preserve">Both staged and unstaged changes of selected file(s) will be stashed!!!</x:String>
565568
<x:String x:Key="Text.Stash.Title" xml:space="preserve">Stash Local Changes</x:String>
566569
<x:String x:Key="Text.StashCM.Apply" xml:space="preserve">Apply</x:String>
567570
<x:String x:Key="Text.StashCM.Drop" xml:space="preserve">Drop</x:String>

src/Resources/Locales/fr_FR.axaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<ResourceDictionary.MergedDictionaries>
33
<ResourceInclude Source="avares://SourceGit/Resources/Locales/en_US.axaml"/>
44
</ResourceDictionary.MergedDictionaries>
5-
65
<x:String x:Key="Text.About" xml:space="preserve">À propos</x:String>
76
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Compilé avec </x:String>
87
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
@@ -346,8 +345,6 @@
346345
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String>
347346
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String>
348347
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String>
349-
<x:String x:Key="Text.InteractiveRebase.MoveUp" xml:space="preserve">Move Up</x:String>
350-
<x:String x:Key="Text.InteractiveRebase.MoveDown" xml:space="preserve">Move Down</x:String>
351348
<x:String x:Key="Text.Launcher" xml:space="preserve">Source Git</x:String>
352349
<x:String x:Key="Text.Launcher.Error" xml:space="preserve">ERROR</x:String>
353350
<x:String x:Key="Text.Launcher.Info" xml:space="preserve">NOTICE</x:String>
@@ -479,7 +476,7 @@
479476
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
480477
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
481478
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Ouvrir dans l'explorateur Windows</x:String>
482-
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches &amp; Tags &amp; Submodules</x:String>
479+
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String>
483480
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
484481
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
485482
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>

0 commit comments

Comments
 (0)