Skip to content

Commit 0f13c00

Browse files
committed
Merge branch 'release/v2025.03'
2 parents 4f3e639 + b00c81c commit 0f13c00

Some content is hidden

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

41 files changed

+699
-679
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
4848
## Translation Status
4949

50-
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-97.55%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-100.00%25-brightgreen)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-94.69%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-93.33%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-94.42%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
50+
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-100.00%25-brightgreen)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-100.00%25-brightgreen)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-94.69%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-93.32%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-94.41%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
5151

5252
> [!NOTE]
5353
> You can find the missing keys in [TRANSLATION.md](TRANSLATION.md)
@@ -62,7 +62,7 @@ This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationD
6262

6363
| OS | PATH |
6464
|---------|-----------------------------------------------------|
65-
| Windows | `C:\Users\USER_NAME\AppData\Roaming\SourceGit` |
65+
| Windows | `%APPDATA%\SourceGit` |
6666
| Linux | `${HOME}/.config/SourceGit` or `${HOME}/.sourcegit` |
6767
| macOS | `${HOME}/Library/Application Support/SourceGit` |
6868

@@ -107,7 +107,7 @@ For **Linux** users:
107107
`deb` how to:
108108
```shell
109109
curl https://codeberg.org/api/packages/yataro/debian/repository.key | sudo tee /etc/apt/keyrings/sourcegit.asc
110-
echo "deb [signed-by=/etc/apt/keyrings/sourcegit.asc] https://codeberg.org/api/packages/yataro/debian generic main" | sudo tee /etc/apt/sources.list.d/sourcegit.list
110+
echo "deb [signed-by=/etc/apt/keyrings/sourcegit.asc, arch=amd64,arm64] https://codeberg.org/api/packages/yataro/debian generic main" | sudo tee /etc/apt/sources.list.d/sourcegit.list
111111
sudo apt update
112112
sudo apt install sourcegit
113113
```

TRANSLATION.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
1-
### de_DE.axaml: 97.55%
1+
### de_DE.axaml: 100.00%
22

33

44
<details>
55
<summary>Missing Keys</summary>
66

7-
- Text.Configure.IssueTracker.AddSampleGiteeIssue
8-
- Text.Configure.IssueTracker.AddSampleGiteePullRequest
9-
- Text.Preferences.General.DateFormat
10-
- Text.Preferences.Git.SSLVerify
11-
- Text.Repository.HistoriesLayout
12-
- Text.Repository.HistoriesLayout.Horizontal
13-
- Text.Repository.HistoriesLayout.Vertical
14-
- Text.Repository.HistoriesOrder
15-
- Text.Repository.OnlyHighlightCurrentBranchInHistories
16-
- Text.Repository.Tags.OrderByCreatorDate
17-
- Text.Repository.Tags.OrderByNameAsc
18-
- Text.Repository.Tags.OrderByNameDes
19-
- Text.Repository.Tags.Sort
20-
- Text.Repository.UseRelativeTimeInHistories
21-
- Text.SetUpstream
22-
- Text.SetUpstream.Local
23-
- Text.SetUpstream.Unset
24-
- Text.SetUpstream.Upstream
7+
258

269
</details>
2710

@@ -83,7 +66,7 @@
8366

8467
</details>
8568

86-
### it_IT.axaml: 93.33%
69+
### it_IT.axaml: 93.32%
8770

8871

8972
<details>
@@ -141,7 +124,7 @@
141124

142125
</details>
143126

144-
### pt_BR.axaml: 94.42%
127+
### pt_BR.axaml: 94.41%
145128

146129

147130
<details>

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.02
1+
2025.03

src/Commands/LFS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace SourceGit.Commands
77
{
88
public partial class LFS
99
{
10-
[GeneratedRegex(@"^(.+)\s+(\w+)\s+\w+:(\d+)$")]
10+
[GeneratedRegex(@"^(.+)\s+([\w.]+)\s+\w+:(\d+)$")]
1111
private static partial Regex REG_LOCK();
1212

1313
class SubCmd : Command

src/Commands/QueryStashChanges.cs

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

src/Commands/QueryStashes.cs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23

34
namespace SourceGit.Commands
45
{
@@ -8,7 +9,7 @@ public QueryStashes(string repo)
89
{
910
WorkingDirectory = repo;
1011
Context = repo;
11-
Args = "stash list --pretty=format:%H%n%ct%n%gd%n%s";
12+
Args = "stash list --pretty=format:%H%n%P%n%ct%n%gd%n%s";
1213
}
1314

1415
public List<Models.Stash> Result()
@@ -26,21 +27,32 @@ protected override void OnReadline(string line)
2627
_stashes.Add(_current);
2728
break;
2829
case 1:
29-
_current.Time = ulong.Parse(line);
30+
ParseParent(line);
3031
break;
3132
case 2:
32-
_current.Name = line;
33+
_current.Time = ulong.Parse(line);
3334
break;
3435
case 3:
36+
_current.Name = line;
37+
break;
38+
case 4:
3539
_current.Message = line;
3640
break;
3741
}
3842

3943
_nextLineIdx++;
40-
if (_nextLineIdx > 3)
44+
if (_nextLineIdx > 4)
4145
_nextLineIdx = 0;
4246
}
4347

48+
private void ParseParent(string data)
49+
{
50+
if (data.Length < 8)
51+
return;
52+
53+
_current.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
54+
}
55+
4456
private readonly List<Models.Stash> _stashes = new List<Models.Stash>();
4557
private Models.Stash _current = null;
4658
private int _nextLineIdx = 0;

src/Commands/Stash.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@ public Stash(string repo)
1111
Context = repo;
1212
}
1313

14-
public bool Push(string message)
14+
public bool Push(string message, bool includeUntracked = true, bool keepIndex = false)
1515
{
16-
Args = $"stash push -m \"{message}\"";
16+
var builder = new StringBuilder();
17+
builder.Append("stash push ");
18+
if (includeUntracked)
19+
builder.Append("--include-untracked ");
20+
if (keepIndex)
21+
builder.Append("--keep-index ");
22+
builder.Append("-m \"");
23+
builder.Append(message);
24+
builder.Append("\"");
25+
26+
Args = builder.ToString();
1727
return Exec();
1828
}
1929

@@ -65,13 +75,13 @@ public bool PushOnlyStaged(string message, bool keepIndex)
6575

6676
public bool Apply(string name)
6777
{
68-
Args = $"stash apply -q {name}";
78+
Args = $"stash apply --index -q {name}";
6979
return Exec();
7080
}
7181

7282
public bool Pop(string name)
7383
{
74-
Args = $"stash pop -q {name}";
84+
Args = $"stash pop --index -q {name}";
7585
return Exec();
7686
}
7787

src/Models/Stash.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
using System;
2+
using System.Collections.Generic;
23

34
namespace SourceGit.Models
45
{
56
public class Stash
67
{
78
public string Name { get; set; } = "";
89
public string SHA { get; set; } = "";
10+
public List<string> Parents { get; set; } = [];
911
public ulong Time { get; set; } = 0;
1012
public string Message { get; set; } = "";
13+
public bool HasUntracked => Parents.Count == 3;
1114

1215
public string TimeStr => DateTime.UnixEpoch.AddSeconds(Time).ToLocalTime().ToString(DateTimeFormat.Actived.DateTime);
1316
}

src/Models/Watcher.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public void MarkBranchDirtyManually()
7272
_updateBranch = DateTime.Now.ToFileTime() - 1;
7373
}
7474

75+
public void MarkTagDirtyManually()
76+
{
77+
_updateTags = DateTime.Now.ToFileTime() - 1;
78+
}
79+
7580
public void MarkWorkingCopyDirtyManually()
7681
{
7782
_updateWC = DateTime.Now.ToFileTime() - 1;

src/Resources/Icons.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<StreamGeometry x:Key="Icons.Plus">m186 532 287 0 0 287c0 11 9 20 20 20s20-9 20-20l0-287 287 0c11 0 20-9 20-20s-9-20-20-20l-287 0 0-287c0-11-9-20-20-20s-20 9-20 20l0 287-287 0c-11 0-20 9-20 20s9 20 20 20z</StreamGeometry>
8787
<StreamGeometry x:Key="Icons.Pull">M432 0h160c27 0 48 21 48 48v336h175c36 0 53 43 28 68L539 757c-15 15-40 15-55 0L180 452c-25-25-7-68 28-68H384V48c0-27 21-48 48-48zm592 752v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h293l98 98c40 40 105 40 145 0l98-98H976c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z</StreamGeometry>
8888
<StreamGeometry x:Key="Icons.Push">M592 768h-160c-27 0-48-21-48-48V384h-175c-36 0-53-43-28-68L485 11c15-15 40-15 55 0l304 304c25 25 7 68-28 68H640v336c0 27-21 48-48 48zm432-16v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h272v16c0 62 50 112 112 112h160c62 0 112-50 112-112v-16h272c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z</StreamGeometry>
89+
<StreamGeometry x:Key="Icons.Quit">M563 555c0 28-23 51-51 51-28 0-51-23-51-51L461 113c0-28 23-51 51-51s51 23 51 51L563 555 563 555zM85 535c0-153 81-287 201-362 24-15 55-8 70 16C371 214 363 245 340 260 248 318 187 419 187 535c0 180 146 325 325 325 180-0 325-146 325-325 0-119-64-223-160-280-24-14-32-46-18-70 14-24 46-32 70-18 125 74 210 211 210 367 0 236-191 427-427 427C276 963 85 772 85 535</StreamGeometry>
8990
<StreamGeometry x:Key="Icons.Rebase">M277 85a149 149 0 00-43 292v230a32 32 0 0064 0V555h267A160 160 0 00725 395v-12a149 149 0 10-64-5v17a96 96 0 01-96 96H299V383A149 149 0 00277 85zM228 720a32 32 0 00-37-52 150 150 0 00-53 68 32 32 0 1060 23 85 85 0 0130-39zm136-52a32 32 0 00-37 52 86 86 0 0130 39 32 32 0 1060-23 149 149 0 00-53-68zM204 833a32 32 0 10-55 32 149 149 0 0063 58 32 32 0 0028-57 85 85 0 01-36-33zm202 32a32 32 0 00-55-32 85 85 0 01-36 33 32 32 0 0028 57 149 149 0 0063-58z</StreamGeometry>
9091
<StreamGeometry x:Key="Icons.Reference">M467 556c0-0 0-1 0-1C467 555 467 556 467 556zM467 556c0-0 0-0 0-0C467 556 467 556 467 556zM467 556c-0 0-0 0-0 0C467 557 467 557 467 556zM468 549C468 532 468 541 468 549L468 549zM468 549c0 1-0 1-0 2C468 551 468 550 468 549zM468 552c-0 1-0 2-0 3C467 554 468 553 468 552zM736 549C736 532 736 541 736 549L736 549zM289 378l0 179 89 0c-1 80-89 89-89 89l45 45c0 0 129-15 134-134L467 378 289 378zM959 244l0 536c0 99-80 179-179 179L244 959c-99 0-179-80-179-179L65 244c0-99 80-179 179-179l536 0C879 65 959 145 959 244zM869 289c0-74-60-134-134-134L289 155c-74 0-134 60-134 134l0 447c0 74 60 134 134 134l447 0c74 0 134-60 134-134L869 289zM557 557l89 0c-1 80-89 89-89 89l45 45c0 0 129-15 134-134L735 378 557 378 557 557z</StreamGeometry>
9192
<StreamGeometry x:Key="Icons.Relation">m224 154a166 166 0 00-166 166v192a166 166 0 00166 166h64v-76h-64a90 90 0 01-90-90v-192a90 90 0 0190-90h320a90 90 0 0190 90v192a90 90 0 01-90 90h-128v77h128a166 166 0 00166-167v-192a166 166 0 00-166-166h-320zm166 390a90 90 0 0190-90h128v-76h-128a166 166 0 00-166 166v192a166 166 0 00166 166h320a166 166 0 00166-166v-192a166 166 0 00-166-166h-64v77h64a90 90 0 0190 90v192a90 90 0 01-90 90h-320a90 90 0 01-90-90v-192z</StreamGeometry>

0 commit comments

Comments
 (0)