L!GNCg1F1^O8tnY+2z;kJKJlTX2@36VYCp!+Ws93F&5v
zrinRJS;1(fPnl+fI>6?RDzAuoF*?x@8l+{2dkK?`5kliA#S0y}OEVB^1VviZhA3gRq)3oC0gj>74#oiLpy0=fl8sH0ErbSOPLkO#NlgC
zT@`fqFA*(vAW;Ny%;3m6<(Ui}D#C??Xt_l+lQ2BCiG66meXslLZEd}%2b{&Oo3DG5
zGX{wby~P>AaGJaGf-PzW>5$JJ{tCApxr;pXL~|X`8YiCap}i<2WGh>kP_cB)9wy_Q
z@#zs-1nt4s4y_I2%@Ni)dV3bh`zczVT|j%3(MS-W;(%zrMYPz#d2ppCTOX018K9gc
zYK64g3B%I^bf<-C8+6YgZ9_EICh(fmfAghnd%(6L2;i)v#*ysmLdW0}jf4SSgu1TL
z-3Z-_P%|;67dPij6T4F)XzQ4)Y!O5em9z9NTOjJj6vHv;U)nts7G$mH_9=E{E)k_4OkWd1$lM_yU`azE0dIVckDB}q`F%pMVWku~A
z`rs_jy6rc9@j@H96ai(Hk<7P==2{RbRIE`ENL}NmQC$@pv@!U=V0xNpCO~U&YbmS$
zbUz`Qbag~EtSHkG(VC>yA_zmuNzsJ50)q-dW|rp&XJTw+q3}pmBfbfA3TGEvV3jAj
zyvy?T~lp#u5L_wQKhor~W$yfSBJ|H#`ktnnSwEx3r-S+F(Uufr!Lm+v|Wp7%%
z@c;xKJ>8^O^)u4d5n&WJ!A~#EE-@Ufy&ZzYP_C!+kFOF~h4O-}9o1lr@y+hCCI%>I
ztsu~dR!AU7s4z*0NetP_CQ%rpLX9?p2@EV~jJ~F6IfW#UJ6)G}>
zp(bA$F*>$|7>|h~OrSwEQ>ZO!ihP1X69f@~IlFbf39yRSIH{YcP^hRj#$@-d4ErDa
z%FMZkpNAa@c=8|o%qO$9evXPliql)9-&iAkXbs~95ka(I1yCL*o?TD5g0S7?#Fy?P
z@XeMt?Lo9ZH`1&$UH+_R5zTd3xb6V1r64j$q*0;5SmD@5Zbw)0$ResG
zxuU0=HKl2n)eyH6g2fId2^l@OM*85H5A^@`)_?bC3mfb>1gibrFDDC&FX`-EO5CKT
zTp3btW@z6eHpB~NntL~1F?hdbIqSc#irTi8U$2Z>DFXeyrjJQ_{Ie$
z!lguT>z$v!+s(9Y46OPX5VI_oxG~drF;n`!|9F0>L
zCj?FrJB>ZoXXUf^WBQg*8+4$ti7@xX{glRGrq_n&9i!=e&wh@k=b~DOYDH9Q;z|z#
zr#|2kb>rxNeeV7X?K_JdhrqWO!Zizfp7eqiMzjW>hEv+8|Ukf#&I;(=
Date: Thu, 20 Feb 2025 11:12:29 +0800
Subject: [PATCH 134/364] enhance: prefer to use `Default Remote` in repository
settings while fetching remote changes (#1008)
Signed-off-by: leo
---
src/ViewModels/Fetch.cs | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/ViewModels/Fetch.cs b/src/ViewModels/Fetch.cs
index d816d0b8..1094012e 100644
--- a/src/ViewModels/Fetch.cs
+++ b/src/ViewModels/Fetch.cs
@@ -38,7 +38,24 @@ namespace SourceGit.ViewModels
{
_repo = repo;
_fetchAllRemotes = preferedRemote == null;
- SelectedRemote = preferedRemote != null ? preferedRemote : _repo.Remotes[0];
+
+ if (preferedRemote != null)
+ {
+ SelectedRemote = preferedRemote;
+ }
+ else if (!string.IsNullOrEmpty(_repo.Settings.DefaultRemote))
+ {
+ var def = _repo.Remotes.Find(r => r.Name == _repo.Settings.DefaultRemote);
+ if (def != null)
+ SelectedRemote = def;
+ else
+ SelectedRemote = _repo.Remotes[0];
+ }
+ else
+ {
+ SelectedRemote = _repo.Remotes[0];
+ }
+
View = new Views.Fetch() { DataContext = this };
}
From b5feabfd37816ced5ecfa6eacb6fd820833e1651 Mon Sep 17 00:00:00 2001
From: leo
Date: Thu, 20 Feb 2025 15:42:11 +0800
Subject: [PATCH 135/364] enhance: auto-set commit message while rebasing is
inprogress (#1003)
Signed-off-by: leo
---
src/ViewModels/WorkingCopy.cs | 100 +++++++++++++++++++---------------
1 file changed, 56 insertions(+), 44 deletions(-)
diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs
index d87c54ec..f1db3f3d 100644
--- a/src/ViewModels/WorkingCopy.cs
+++ b/src/ViewModels/WorkingCopy.cs
@@ -233,25 +233,10 @@ namespace SourceGit.ViewModels
// Just force refresh selected changes.
Dispatcher.UIThread.Invoke(() =>
{
- if (_selectedUnstaged.Count == 1)
- SetDetail(_selectedUnstaged[0], true);
- else if (_selectedStaged.Count == 1)
- SetDetail(_selectedStaged[0], false);
- else
- SetDetail(null, false);
-
- var inProgress = null as InProgressContext;
- if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
- inProgress = new CherryPickInProgress(_repo);
- else if (Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")) || Directory.Exists(Path.Combine(_repo.GitDir, "rebase-apply")))
- inProgress = new RebaseInProgress(_repo);
- else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
- inProgress = new RevertInProgress(_repo);
- else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
- inProgress = new MergeInProgress(_repo);
-
HasUnsolvedConflicts = _cached.Find(x => x.IsConflit) != null;
- InProgressContext = inProgress;
+
+ UpdateDetail();
+ UpdateInProgressState();
});
return;
@@ -311,32 +296,8 @@ namespace SourceGit.ViewModels
SelectedStaged = selectedStaged;
_isLoadingData = false;
- if (selectedUnstaged.Count == 1)
- SetDetail(selectedUnstaged[0], true);
- else if (selectedStaged.Count == 1)
- SetDetail(selectedStaged[0], false);
- else
- SetDetail(null, false);
-
- var inProgress = null as InProgressContext;
- if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
- inProgress = new CherryPickInProgress(_repo);
- else if (Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")) || Directory.Exists(Path.Combine(_repo.GitDir, "rebase-apply")))
- inProgress = new RebaseInProgress(_repo);
- else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
- inProgress = new RevertInProgress(_repo);
- else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
- inProgress = new MergeInProgress(_repo);
-
- InProgressContext = inProgress;
-
- // Try to load merge message from MERGE_MSG
- if (string.IsNullOrEmpty(_commitMessage))
- {
- var mergeMsgFile = Path.Combine(_repo.GitDir, "MERGE_MSG");
- if (File.Exists(mergeMsgFile))
- CommitMessage = File.ReadAllText(mergeMsgFile);
- }
+ UpdateDetail();
+ UpdateInProgressState();
});
}
@@ -1488,6 +1449,57 @@ namespace SourceGit.ViewModels
return rs;
}
+ private void UpdateDetail()
+ {
+ if (_selectedUnstaged.Count == 1)
+ SetDetail(_selectedUnstaged[0], true);
+ else if (_selectedStaged.Count == 1)
+ SetDetail(_selectedStaged[0], false);
+ else
+ SetDetail(null, false);
+ }
+
+ private void UpdateInProgressState()
+ {
+ if (string.IsNullOrEmpty(_commitMessage))
+ {
+ var mergeMsgFile = Path.Combine(_repo.GitDir, "MERGE_MSG");
+ if (File.Exists(mergeMsgFile))
+ CommitMessage = File.ReadAllText(mergeMsgFile);
+ }
+
+ if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
+ {
+ InProgressContext = new CherryPickInProgress(_repo);
+ }
+ else if (Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")) || Directory.Exists(Path.Combine(_repo.GitDir, "rebase-apply")))
+ {
+ var rebasing = new RebaseInProgress(_repo);
+ InProgressContext = rebasing;
+
+ if (string.IsNullOrEmpty(_commitMessage))
+ {
+ var rebaseMsgFile = Path.Combine(_repo.GitDir, "rebase-merge", "message");
+ if (File.Exists(rebaseMsgFile))
+ CommitMessage = File.ReadAllText(rebaseMsgFile);
+ else if (rebasing.StoppedAt != null)
+ CommitMessage = new Commands.QueryCommitFullMessage(_repo.FullPath, rebasing.StoppedAt.SHA).Result();
+ }
+ }
+ else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
+ {
+ InProgressContext = new RevertInProgress(_repo);
+ }
+ else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
+ {
+ InProgressContext = new MergeInProgress(_repo);
+ }
+ else
+ {
+ InProgressContext = null;
+ }
+ }
+
private async void StageChanges(List changes, Models.Change next)
{
if (changes.Count == 0)
From 9da2c787dbf0dbac7cc26ce777672857d40e6066 Mon Sep 17 00:00:00 2001
From: leo
Date: Fri, 21 Feb 2025 09:44:51 +0800
Subject: [PATCH 136/364] enhance: supports to configure `fetch.prune` for
selected repository (#995)
Signed-off-by: leo
---
src/ViewModels/RepositoryConfigure.cs | 9 +++++++++
src/Views/RepositoryConfigure.axaml | 8 ++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/ViewModels/RepositoryConfigure.cs b/src/ViewModels/RepositoryConfigure.cs
index a7c04937..cf23b6d8 100644
--- a/src/ViewModels/RepositoryConfigure.cs
+++ b/src/ViewModels/RepositoryConfigure.cs
@@ -60,6 +60,12 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _httpProxy, value);
}
+ public bool EnablePruneOnFetch
+ {
+ get;
+ set;
+ }
+
public bool EnableAutoFetch
{
get => _repo.Settings.EnableAutoFetch;
@@ -153,6 +159,8 @@ namespace SourceGit.ViewModels
GPGUserSigningKey = signingKey;
if (_cached.TryGetValue("http.proxy", out var proxy))
HttpProxy = proxy;
+ if (_cached.TryGetValue("fetch.prune", out var prune))
+ EnablePruneOnFetch = (prune == "true");
}
public void ClearHttpProxy()
@@ -286,6 +294,7 @@ namespace SourceGit.ViewModels
SetIfChanged("tag.gpgsign", GPGTagSigningEnabled ? "true" : "false", "false");
SetIfChanged("user.signingkey", GPGUserSigningKey, "");
SetIfChanged("http.proxy", HttpProxy, "");
+ SetIfChanged("fetch.prune", EnablePruneOnFetch ? "true" : "false", "false");
}
private void SetIfChanged(string key, string value, string defValue)
diff --git a/src/Views/RepositoryConfigure.axaml b/src/Views/RepositoryConfigure.axaml
index 61bc14e0..f6a02c49 100644
--- a/src/Views/RepositoryConfigure.axaml
+++ b/src/Views/RepositoryConfigure.axaml
@@ -44,7 +44,7 @@
-
+
-
+
+
+
From 2b4fc64c73b126fd0d94b5562be53e25dcf7b24d Mon Sep 17 00:00:00 2001
From: leo
Date: Fri, 21 Feb 2025 10:26:14 +0800
Subject: [PATCH 137/364] fix: resolve conflict with deleted files does not
work (#1009)
Signed-off-by: leo
---
src/Commands/Add.cs | 4 +-
src/ViewModels/WorkingCopy.cs | 76 ++++++++++++++++++++++++++-------
src/Views/TextDiffView.axaml.cs | 2 +-
3 files changed, 64 insertions(+), 18 deletions(-)
diff --git a/src/Commands/Add.cs b/src/Commands/Add.cs
index e1b55b68..b2aa803d 100644
--- a/src/Commands/Add.cs
+++ b/src/Commands/Add.cs
@@ -12,7 +12,7 @@ namespace SourceGit.Commands
Args = includeUntracked ? "add ." : "add -u .";
}
- public Add(string repo, List changes)
+ public Add(string repo, List changes)
{
WorkingDirectory = repo;
Context = repo;
@@ -22,7 +22,7 @@ namespace SourceGit.Commands
foreach (var c in changes)
{
builder.Append(" \"");
- builder.Append(c.Path);
+ builder.Append(c);
builder.Append("\"");
}
Args = builder.ToString();
diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs
index f1db3f3d..ce2a2ac1 100644
--- a/src/ViewModels/WorkingCopy.cs
+++ b/src/ViewModels/WorkingCopy.cs
@@ -353,38 +353,80 @@ namespace SourceGit.ViewModels
public async void UseTheirs(List changes)
{
+ _repo.SetWatcherEnabled(false);
+
var files = new List();
+ var needStage = new List();
+
foreach (var change in changes)
{
- if (change.IsConflit)
+ if (!change.IsConflit)
+ continue;
+
+ if (change.WorkTree == Models.ChangeState.Deleted)
+ {
+ var fullpath = Path.Combine(_repo.FullPath, change.Path);
+ if (File.Exists(fullpath))
+ File.Delete(fullpath);
+
+ needStage.Add(change.Path);
+ }
+ else
+ {
files.Add(change.Path);
+ }
}
- _repo.SetWatcherEnabled(false);
- var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseTheirs(files));
- if (succ)
+ if (files.Count > 0)
{
- await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
+ var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseTheirs(files));
+ if (succ)
+ needStage.AddRange(files);
}
+
+ if (needStage.Count > 0)
+ await Task.Run(() => new Commands.Add(_repo.FullPath, needStage).Exec());
+
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
}
public async void UseMine(List changes)
{
+ _repo.SetWatcherEnabled(false);
+
var files = new List();
+ var needStage = new List();
+
foreach (var change in changes)
{
- if (change.IsConflit)
+ if (!change.IsConflit)
+ continue;
+
+ if (change.Index == Models.ChangeState.Deleted)
+ {
+ var fullpath = Path.Combine(_repo.FullPath, change.Path);
+ if (File.Exists(fullpath))
+ File.Delete(fullpath);
+
+ needStage.Add(change.Path);
+ }
+ else
+ {
files.Add(change.Path);
+ }
}
- _repo.SetWatcherEnabled(false);
- var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseMine(files));
- if (succ)
+ if (files.Count > 0)
{
- await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
+ var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseMine(files));
+ if (succ)
+ needStage.AddRange(files);
}
+
+ if (needStage.Count > 0)
+ await Task.Run(() => new Commands.Add(_repo.FullPath, needStage).Exec());
+
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
}
@@ -1502,7 +1544,8 @@ namespace SourceGit.ViewModels
private async void StageChanges(List changes, Models.Change next)
{
- if (changes.Count == 0)
+ var count = changes.Count;
+ if (count == 0)
return;
// Use `_selectedUnstaged` instead of `SelectedUnstaged` to avoid UI refresh.
@@ -1510,7 +1553,7 @@ namespace SourceGit.ViewModels
IsStaging = true;
_repo.SetWatcherEnabled(false);
- if (changes.Count == _unstaged.Count)
+ if (count == _unstaged.Count)
{
await Task.Run(() => new Commands.Add(_repo.FullPath, _repo.IncludeUntracked).Exec());
}
@@ -1527,10 +1570,13 @@ namespace SourceGit.ViewModels
}
else
{
- for (int i = 0; i < changes.Count; i += 10)
+ var paths = new List();
+ foreach (var c in changes)
+ paths.Add(c.Path);
+
+ for (int i = 0; i < count; i += 10)
{
- var count = Math.Min(10, changes.Count - i);
- var step = changes.GetRange(i, count);
+ var step = paths.GetRange(i, Math.Min(10, count - i));
await Task.Run(() => new Commands.Add(_repo.FullPath, step).Exec());
}
}
diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs
index 28fe81a8..83bc47e3 100644
--- a/src/Views/TextDiffView.axaml.cs
+++ b/src/Views/TextDiffView.axaml.cs
@@ -1796,7 +1796,7 @@ namespace SourceGit.Views
if (!selection.HasLeftChanges)
{
- new Commands.Add(repo.FullPath, [change]).Exec();
+ new Commands.Add(repo.FullPath, [change.Path]).Exec();
}
else
{
From 841276852a29c12f9da642e8d3c5f96b6cb7fce1 Mon Sep 17 00:00:00 2001
From: saxc
Date: Fri, 21 Feb 2025 03:34:38 +0100
Subject: [PATCH 138/364] localization: add german translations (#1011)
(cherry picked from commit fcc720480c85fe01120e555c22b6aec286ee717b)
---
src/Resources/Locales/de_DE.axaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml
index b6458822..c16c90b5 100644
--- a/src/Resources/Locales/de_DE.axaml
+++ b/src/Resources/Locales/de_DE.axaml
@@ -59,6 +59,7 @@
Mit HEAD vergleichen
Mit Worktree vergleichen
Branch-Namen kopieren
+ Benutzerdefinierte Aktion
Lösche ${0}$...
Lösche alle ausgewählten {0} Branches
Alle Änderungen verwerfen
@@ -159,6 +160,7 @@
Ausführbare Datei:
Name:
Geltungsbereich:
+ Branch
Commit
Repository
Email Adresse
@@ -586,6 +588,7 @@
LOKALE BRANCHES
Zum HEAD wechseln
Erstelle Branch
+ BENACHRICHTIGUNGEN LÖSCHEN
Nur aktuellen Branch im Graphen hervorheben
Öffne in {0}
Öffne in externen Tools
@@ -710,7 +713,7 @@
Öffne alle Repositories
Öffne Repository
Öffne Terminal
- Klon Standardordner erneut nach Repositories durchsuchen
+ Klon Standardordner erneut nach Repositories durchsuchen
Suche Repositories...
Sortieren
Änderungen
From b2ab62825ece1bb0111782f094266d1445c3a110 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Fri, 21 Feb 2025 02:48:21 +0000
Subject: [PATCH 139/364] doc: Update translation status and missing keys
---
README.md | 2 +-
TRANSLATION.md | 5 +----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 784d0672..60c8543e 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@
## Translation Status
-[](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md)
+[](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md)
> [!NOTE]
> You can find the missing keys in [TRANSLATION.md](TRANSLATION.md)
diff --git a/TRANSLATION.md b/TRANSLATION.md
index 53631bc1..c235ea6a 100644
--- a/TRANSLATION.md
+++ b/TRANSLATION.md
@@ -1,15 +1,12 @@
-### de_DE.axaml: 99.20%
+### de_DE.axaml: 99.60%
Missing Keys
-- Text.BranchCM.CustomAction
- Text.BranchUpstreamInvalid
-- Text.Configure.CustomAction.Scope.Branch
- Text.Configure.CustomAction.WaitForExit
- Text.Preferences.AI.Streaming
-- Text.Repository.Notifications.Clear
From 9ab602788a7bfeaf05e382d876a145547cc3e73c Mon Sep 17 00:00:00 2001
From: Ikko Eltociear Ashimine
Date: Mon, 24 Feb 2025 10:28:00 +0900
Subject: [PATCH 140/364] docs: update README.md (#1014)
comaptible -> compatible
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 60c8543e..256070e2 100644
--- a/README.md
+++ b/README.md
@@ -132,7 +132,7 @@ For **Linux** users:
## OpenAI
-This software supports using OpenAI or other AI service that has an OpenAI comaptible HTTP API to generate commit message. You need configurate the service in `Preference` window.
+This software supports using OpenAI or other AI service that has an OpenAI compatible HTTP API to generate commit message. You need configurate the service in `Preference` window.
For `OpenAI`:
From fa4caa218628169d5f34076732ffa9b35ed040fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=B6ran=20W?= <44604769+goran-w@users.noreply.github.com>
Date: Mon, 24 Feb 2025 02:32:19 +0100
Subject: [PATCH 141/364] enhance: add first/last buttons for block-nav, no
wrapping (#1015) (#1016)
Added 2 new buttons (only visible in block-nav mode), with new icons and new (en_US) strings (First/Last Difference).
Implemented these new buttons, and disabled the automatic wrap-around for the prev/next buttons in block-nav mode.
---
src/Resources/Icons.axaml | 2 ++
src/Resources/Locales/en_US.axaml | 2 ++
src/ViewModels/BlockNavigation.cs | 28 ++++++++++++++--
src/Views/DiffView.axaml | 28 ++++++++++++++++
src/Views/DiffView.axaml.cs | 14 ++++++++
src/Views/TextDiffView.axaml.cs | 56 +++++++++++++++++++++++++++++++
6 files changed, 127 insertions(+), 3 deletions(-)
diff --git a/src/Resources/Icons.axaml b/src/Resources/Icons.axaml
index b7d9c22e..9426d20a 100644
--- a/src/Resources/Icons.axaml
+++ b/src/Resources/Icons.axaml
@@ -5,6 +5,7 @@
M71 1024V0h661L953 219V1024H71zm808-731-220-219H145V951h735V293zM439 512h-220V219h220V512zm-74-219H292v146h74v-146zm0 512h74v73h-220v-73H292v-146H218V585h147v219zm294-366h74V512H512v-73h74v-146H512V219h147v219zm74 439H512V585h220v293zm-74-219h-74v146h74v-146z
M128 256h192a64 64 0 110 128H128a64 64 0 110-128zm576 192h192a64 64 0 010 128h-192a64 64 0 010-128zm-576 192h192a64 64 0 010 128H128a64 64 0 010-128zm576 0h192a64 64 0 010 128h-192a64 64 0 010-128zm0-384h192a64 64 0 010 128h-192a64 64 0 010-128zM128 448h192a64 64 0 110 128H128a64 64 0 110-128zm384-320a64 64 0 0164 64v640a64 64 0 01-128 0V192a64 64 0 0164-64z
M832 64H192c-18 0-32 14-32 32v832c0 18 14 32 32 32h640c18 0 32-14 32-32V96c0-18-14-32-32-32zM736 596 624 502 506 596V131h230v318z
+ M509 546 780 275 871 366 509 728 147 366 238 275zM509 728h-362v128h724v-128z
M757 226a143 143 0 00-55 276 96 96 0 01-88 59h-191a187 187 0 00-96 27V312a143 143 0 10-96 0v399a143 143 0 10103 2 96 96 0 0188-59h191a191 191 0 00187-151 143 143 0 00-43-279zM280 130a48 48 0 110 96 48 48 0 010-96zm0 764a48 48 0 110-96 48 48 0 010 96zM757 417a48 48 0 110-96 48 48 0 010 96z
M896 128h-64V64c0-35-29-64-64-64s-64 29-64 64v64h-64c-35 0-64 29-64 64s29 64 64 64h64v64c0 35 29 64 64 64s64-29 64-64V256h64c35 0 64-29 64-64s-29-64-64-64zm-204 307C673 481 628 512 576 512H448c-47 0-90 13-128 35V372C394 346 448 275 448 192c0-106-86-192-192-192S64 86 64 192c0 83 54 154 128 180v280c-74 26-128 97-128 180c0 106 86 192 192 192s192-86 192-192c0-67-34-125-84-159c22-20 52-33 84-33h128c122 0 223-85 249-199c-19 4-37 7-57 7c-26 0-51-5-76-13zM256 128c35 0 64 29 64 64s-29 64-64 64s-64-29-64-64s29-64 64-64zm0 768c-35 0-64-29-64-64s29-64 64-64s64 29 64 64s-29 64-64 64z
M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z
@@ -119,6 +120,7 @@
M996 452 572 28A96 96 0 00504 0H96C43 0 0 43 0 96v408a96 96 0 0028 68l424 424c37 37 98 37 136 0l408-408c37-37 37-98 0-136zM224 320c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96zm1028 268L844 996c-37 37-98 37-136 0l-1-1L1055 647c34-34 53-79 53-127s-19-93-53-127L663 0h97a96 96 0 0168 28l424 424c37 37 37 98 0 136z
M765 118 629 239l-16 137-186 160 54 59 183-168 144 4 136-129 47-43-175-12L827 67zM489 404c-66 0-124 55-124 125s54 121 124 121c66 0 120-55 120-121H489l23-121c-8-4-16-4-23-4zM695 525c0 114-93 207-206 207s-206-94-206-207 93-207 206-207c16 0 27 0 43 4l43-207c-27-4-54-8-85-8-229 0-416 188-416 419s187 419 416 419c225 0 408-180 416-403v-12l-210-4z
M144 112h736c18 0 32 14 32 32v736c0 18-14 32-32 32H144c-18 0-32-14-32-32V144c0-18 14-32 32-32zm112 211v72a9 9 0 003 7L386 509 259 615a9 9 0 00-3 7v72a9 9 0 0015 7L493 516a9 9 0 000-14l-222-186a9 9 0 00-15 7zM522 624a10 10 0 00-10 10v60a10 10 0 0010 10h237a10 10 0 0010-10v-60a10 10 0 00-10-10H522z
+ M170 831 513 489 855 831 960 726 512 278 64 726 170 831zM512 278h448v-128h-896v128h448z
M897 673v13c0 51-42 93-93 93h-10c-1 0-2 0-2 0H220c-23 0-42 19-42 42v13c0 23 19 42 42 42h552c14 0 26 12 26 26 0 14-12 26-26 26H220c-51 0-93-42-93-93v-13c0-51 42-93 93-93h20c1-0 2-0 2-0h562c23 0 42-19 42-42v-13c0-11-5-22-13-29-8-7-17-11-28-10H660c-14 0-26-12-26-26 0-14 12-26 26-26h144c24-1 47 7 65 24 18 17 29 42 29 67zM479 98c-112 0-203 91-203 203 0 44 14 85 38 118l132 208c15 24 50 24 66 0l133-209c23-33 37-73 37-117 0-112-91-203-203-203zm0 327c-68 0-122-55-122-122s55-122 122-122 122 55 122 122-55 122-122 122z
M912 800a48 48 0 1 1 0 96h-416a48 48 0 1 1 0-96h416z m-704-704A112 112 0 0 1 256 309.184V480h80a48 48 0 0 1 0 96H256v224h81.664a48 48 0 1 1 0 96H256a96 96 0 0 1-96-96V309.248A112 112 0 0 1 208 96z m704 384a48 48 0 1 1 0 96h-416a48 48 0 0 1 0-96h416z m0-320a48 48 0 1 1 0 96h-416a48 48 0 0 1 0-96h416z
M30 0 30 30 0 15z
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index dfc17dee..d2d64d5c 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -252,9 +252,11 @@
File Mode Changed
Ignore Whitespace Change
LFS OBJECT CHANGE
+ First Difference
Next Difference
NO CHANGES OR ONLY EOL CHANGES
Previous Difference
+ Last Difference
Save as Patch
Show hidden symbols
Side-By-Side Diff
diff --git a/src/ViewModels/BlockNavigation.cs b/src/ViewModels/BlockNavigation.cs
index 709338f8..9a5a926c 100644
--- a/src/ViewModels/BlockNavigation.cs
+++ b/src/ViewModels/BlockNavigation.cs
@@ -101,12 +101,12 @@ namespace SourceGit.ViewModels
return (_current >= 0 && _current < Blocks.Count) ? Blocks[_current] : null;
}
- public Block GotoNext()
+ public Block GotoFirst()
{
if (Blocks.Count == 0)
return null;
- Current = (_current + 1) % Blocks.Count;
+ Current = 0;
return Blocks[_current];
}
@@ -115,7 +115,29 @@ namespace SourceGit.ViewModels
if (Blocks.Count == 0)
return null;
- Current = _current == -1 ? Blocks.Count - 1 : (_current - 1 + Blocks.Count) % Blocks.Count;
+ if (_current == -1)
+ Current = 0;
+ else if (_current > 0)
+ Current = _current - 1;
+ return Blocks[_current];
+ }
+
+ public Block GotoNext()
+ {
+ if (Blocks.Count == 0)
+ return null;
+
+ if (_current < Blocks.Count - 1)
+ Current = _current + 1;
+ return Blocks[_current];
+ }
+
+ public Block GotoLast()
+ {
+ if (Blocks.Count == 0)
+ return null;
+
+ Current = Blocks.Count - 1;
return Blocks[_current];
}
diff --git a/src/Views/DiffView.axaml b/src/Views/DiffView.axaml
index aa75c2a0..fccb949d 100644
--- a/src/Views/DiffView.axaml
+++ b/src/Views/DiffView.axaml
@@ -34,6 +34,20 @@
+
+
+
+
();
+ textDiff?.GotoFirstChange();
+ e.Handled = true;
+ }
+
private void OnGotoPrevChange(object _, RoutedEventArgs e)
{
var textDiff = this.FindDescendantOfType();
@@ -24,5 +31,12 @@ namespace SourceGit.Views
textDiff?.GotoNextChange();
e.Handled = true;
}
+
+ private void OnGotoLastChange(object _, RoutedEventArgs e)
+ {
+ var textDiff = this.FindDescendantOfType();
+ textDiff?.GotoLastChange();
+ e.Handled = true;
+ }
}
}
diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs
index 83bc47e3..323fde03 100644
--- a/src/Views/TextDiffView.axaml.cs
+++ b/src/Views/TextDiffView.axaml.cs
@@ -543,6 +543,21 @@ namespace SourceGit.Views
{
}
+ public void GotoFirstChange()
+ {
+ var blockNavigation = BlockNavigation;
+ if (blockNavigation != null)
+ {
+ var prev = blockNavigation.GotoFirst();
+ if (prev != null)
+ {
+ TextArea.Caret.Line = prev.Start;
+ ScrollToLine(prev.Start);
+ }
+ }
+ // NOTE: Not implemented (button hidden) for non-block navigation.
+ }
+
public void GotoPrevChange()
{
var blockNavigation = BlockNavigation;
@@ -641,6 +656,21 @@ namespace SourceGit.Views
}
}
+ public void GotoLastChange()
+ {
+ var blockNavigation = BlockNavigation;
+ if (blockNavigation != null)
+ {
+ var next = blockNavigation.GotoLast();
+ if (next != null)
+ {
+ TextArea.Caret.Line = next.Start;
+ ScrollToLine(next.Start);
+ }
+ }
+ // NOTE: Not implemented (button hidden) for non-block navigation.
+ }
+
public override void Render(DrawingContext context)
{
base.Render(context);
@@ -1682,6 +1712,19 @@ namespace SourceGit.Views
InitializeComponent();
}
+ public void GotoFirstChange()
+ {
+ var presenter = this.FindDescendantOfType();
+ if (presenter == null)
+ return;
+
+ presenter.GotoFirstChange();
+ if (presenter is SingleSideTextDiffPresenter singleSide)
+ singleSide.ForceSyncScrollOffset();
+
+ BlockNavigationIndicator = BlockNavigation?.Indicator ?? string.Empty;
+ }
+
public void GotoPrevChange()
{
var presenter = this.FindDescendantOfType();
@@ -1708,6 +1751,19 @@ namespace SourceGit.Views
BlockNavigationIndicator = BlockNavigation?.Indicator ?? string.Empty;
}
+ public void GotoLastChange()
+ {
+ var presenter = this.FindDescendantOfType();
+ if (presenter == null)
+ return;
+
+ presenter.GotoLastChange();
+ if (presenter is SingleSideTextDiffPresenter singleSide)
+ singleSide.ForceSyncScrollOffset();
+
+ BlockNavigationIndicator = BlockNavigation?.Indicator ?? string.Empty;
+ }
+
protected override void OnDataContextChanged(EventArgs e)
{
base.OnDataContextChanged(e);
From 52a53cc6976df7ff153209ace0e78bb353e50d94 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 24 Feb 2025 01:32:32 +0000
Subject: [PATCH 142/364] doc: Update translation status and missing keys
---
README.md | 2 +-
TRANSLATION.md | 34 ++++++++++++++++++++++++----------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 256070e2..a48af9bd 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@
## Translation Status
-[](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md)
+[](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md)
> [!NOTE]
> You can find the missing keys in [TRANSLATION.md](TRANSLATION.md)
diff --git a/TRANSLATION.md b/TRANSLATION.md
index c235ea6a..4e96f0ac 100644
--- a/TRANSLATION.md
+++ b/TRANSLATION.md
@@ -1,4 +1,4 @@
-### de_DE.axaml: 99.60%
+### de_DE.axaml: 99.34%
@@ -6,11 +6,13 @@
- Text.BranchUpstreamInvalid
- Text.Configure.CustomAction.WaitForExit
+- Text.Diff.First
+- Text.Diff.Last
- Text.Preferences.AI.Streaming
-### es_ES.axaml: 97.35%
+### es_ES.axaml: 97.09%
@@ -31,6 +33,8 @@
- Text.DeleteRepositoryNode.Path
- Text.DeleteRepositoryNode.TipForGroup
- Text.DeleteRepositoryNode.TipForRepository
+- Text.Diff.First
+- Text.Diff.Last
- Text.Preferences.AI.Streaming
- Text.Repository.Notifications.Clear
- Text.Stash.AutoRestore
@@ -39,7 +43,7 @@
-### fr_FR.axaml: 92.18%
+### fr_FR.axaml: 91.93%
@@ -60,6 +64,8 @@
- Text.DeleteRepositoryNode.Path
- Text.DeleteRepositoryNode.TipForGroup
- Text.DeleteRepositoryNode.TipForRepository
+- Text.Diff.First
+- Text.Diff.Last
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
@@ -107,7 +113,7 @@
-### it_IT.axaml: 97.61%
+### it_IT.axaml: 97.35%
@@ -127,6 +133,8 @@
- Text.DeleteRepositoryNode.Path
- Text.DeleteRepositoryNode.TipForGroup
- Text.DeleteRepositoryNode.TipForRepository
+- Text.Diff.First
+- Text.Diff.Last
- Text.Preferences.AI.Streaming
- Text.Repository.Notifications.Clear
- Text.Stash.AutoRestore
@@ -134,7 +142,7 @@
-### pt_BR.axaml: 91.91%
+### pt_BR.axaml: 91.67%
@@ -162,6 +170,8 @@
- Text.DeleteRepositoryNode.Path
- Text.DeleteRepositoryNode.TipForGroup
- Text.DeleteRepositoryNode.TipForRepository
+- Text.Diff.First
+- Text.Diff.Last
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
@@ -204,7 +214,7 @@
-### ru_RU.axaml: 99.47%
+### ru_RU.axaml: 99.21%
@@ -213,26 +223,30 @@
- Text.BranchCM.CustomAction
- Text.BranchUpstreamInvalid
- Text.Configure.CustomAction.Scope.Branch
+- Text.Diff.First
+- Text.Diff.Last
- Text.Preferences.AI.Streaming
-### zh_CN.axaml: 100.00%
+### zh_CN.axaml: 99.74%
Missing Keys
-
+- Text.Diff.First
+- Text.Diff.Last
-### zh_TW.axaml: 100.00%
+### zh_TW.axaml: 99.74%
Missing Keys
-
+- Text.Diff.First
+- Text.Diff.Last
From 124bdc97f96a30ebcd0572671aed5db26bc6ee81 Mon Sep 17 00:00:00 2001
From: leo
Date: Mon, 24 Feb 2025 09:37:34 +0800
Subject: [PATCH 143/364] localization: add missing keys for zh_CN and zh_TW
Signed-off-by: leo
---
src/Resources/Locales/en_US.axaml | 6 +++---
src/Resources/Locales/zh_CN.axaml | 2 ++
src/Resources/Locales/zh_TW.axaml | 2 ++
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index d2d64d5c..1a83a4da 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -250,13 +250,13 @@
OLD
Copy
File Mode Changed
- Ignore Whitespace Change
- LFS OBJECT CHANGE
First Difference
+ Ignore Whitespace Change
+ Last Difference
+ LFS OBJECT CHANGE
Next Difference
NO CHANGES OR ONLY EOL CHANGES
Previous Difference
- Last Difference
Save as Patch
Show hidden symbols
Side-By-Side Diff
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index 115f917e..acfdefd2 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -253,7 +253,9 @@
原始大小
复制
文件权限已变化
+ 首个差异
忽略空白符号变化
+ 最后一个差异
LFS对象变更
下一个差异
没有变更或仅有换行符差异
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index 00933783..dd9092a4 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -253,7 +253,9 @@
原始大小
複製
檔案權限已變更
+ 第一個差異
忽略空白符號變化
+ 最後一個差異
LFS 物件變更
下一個差異
沒有變更或僅有換行字元差異
From 74e5bcb7047d95e38ca116a1fe0ef2ef9c84242e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
Date: Mon, 24 Feb 2025 01:37:52 +0000
Subject: [PATCH 144/364] doc: Update translation status and missing keys
---
README.md | 2 +-
TRANSLATION.md | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index a48af9bd..a82a43b1 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@
## Translation Status
-[](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md)
+[](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md) [](TRANSLATION.md)
> [!NOTE]
> You can find the missing keys in [TRANSLATION.md](TRANSLATION.md)
diff --git a/TRANSLATION.md b/TRANSLATION.md
index 4e96f0ac..acecf990 100644
--- a/TRANSLATION.md
+++ b/TRANSLATION.md
@@ -229,24 +229,22 @@