Commit graph

2841 commits

Author SHA1 Message Date
leo
e2da44c8fd
enhance: use Mutex to force running SourceGit in singleton mode
Signed-off-by: leo <longshuang@msn.cn>
2025-04-15 09:35:16 +08:00
leo
0acbe3e487
enhance: use PipeOptions.FirstPipeInstance to create NamedPipeServerStream
Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 23:55:42 +08:00
leo
05982e6dc0
style: re-design style for disabled primary button
Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 23:23:40 +08:00
leo
e5dc211c35
refactor: simpfy IPC code
Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 23:17:04 +08:00
Gadfly
3b1018e0e2
fix: update visible staged changes retrieval in WorkingCopy (#1187)
* doc: Update translation status and missing keys

* fix: update visible staged changes retrieval in WorkingCopy

* fix: prevent unintended amend behavior when changing current branch

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-14 22:05:05 +08:00
leo
7d20f97f4e
code_review: PR #1185
- make `SourceGit` running in singleton mode
- `TrySendArgsToExistingInstance` should not be called before `BuildAvaloniaApp().StartWithClassicDesktopLifetime(args)` since we may want to launch `SourceGit` as a core editor.
- avoid `preference.json` to be saved by multiple instances.
- move IPC code to models.

Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 22:03:51 +08:00
Massimo
09c0edef8e
feat: implement IPC for opening repositories in new tabs (#1185)
* refactor: improve diff handling for EOL changes and enhance text diff display

- Updated `Diff.cs` to streamline whitespace handling in diff arguments.
- Enhanced `DiffContext.cs` to check for EOL changes when old and new hashes differ, creating a text diff if necessary.
- Added support for showing end-of-line symbols in `TextDiffView.axaml.cs` options.

* localization: update translations to include EOF handling in ignore whitespace messages

- Modified the ignore whitespace text in multiple language files to specify that EOF changes are also ignored.
- Ensured consistency across all localization files for the patch application feature.

* revert: Typo in DiffResult comment

* revert: update diff arguments to ignore CR at EOL in whitespace handling (like before changes)

* revert: update translations to remove EOF references in Text.Apply.IgnoreWS and fixed typo in Text.Diff.IgnoreWhitespace (EOF => EOL)

* feat: add workspace-specific default clone directory functionality

- Implemented logic in Clone.cs to set ParentFolder based on the active workspace's DefaultCloneDir if available, falling back to the global GitDefaultCloneDir.
- Added DefaultCloneDir property to Workspace.cs to store the default clone directory for each workspace.
- Updated ConfigureWorkspace.axaml to include a TextBox and Button for setting the DefaultCloneDir in the UI.
- Implemented folder selection functionality in ConfigureWorkspace.axaml.cs to allow users to choose a directory for cloning.
- This closes issue #1145

* feat: implement IPC for opening repositories in new tabs

- Added functionality to send repository paths to an existing instance of the application using named pipes.
- Introduced a new preference option to open repositories in a new tab instead of a new window.
- Updated UI to include a checkbox for the new preference.
- Enhanced the handling of IPC server lifecycle based on the new preference setting.
- This closes issue #1184

---------

Co-authored-by: mpagani <massimo.pagani@unitec-group.com>
2025-04-14 19:16:15 +08:00
leo
b7aa49403b
code_review: PR #1183
- code style in `Clone` constructor
- re-design workspace configuration dialog

Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 17:03:08 +08:00
Massimo
f14a666091
feat: add workspace-specific default clone directory functionality (#1183)
* refactor: improve diff handling for EOL changes and enhance text diff display

- Updated `Diff.cs` to streamline whitespace handling in diff arguments.
- Enhanced `DiffContext.cs` to check for EOL changes when old and new hashes differ, creating a text diff if necessary.
- Added support for showing end-of-line symbols in `TextDiffView.axaml.cs` options.

* localization: update translations to include EOF handling in ignore whitespace messages

- Modified the ignore whitespace text in multiple language files to specify that EOF changes are also ignored.
- Ensured consistency across all localization files for the patch application feature.

* revert: Typo in DiffResult comment

* revert: update diff arguments to ignore CR at EOL in whitespace handling (like before changes)

* revert: update translations to remove EOF references in Text.Apply.IgnoreWS and fixed typo in Text.Diff.IgnoreWhitespace (EOF => EOL)

* feat: add workspace-specific default clone directory functionality

- Implemented logic in Clone.cs to set ParentFolder based on the active workspace's DefaultCloneDir if available, falling back to the global GitDefaultCloneDir.
- Added DefaultCloneDir property to Workspace.cs to store the default clone directory for each workspace.
- Updated ConfigureWorkspace.axaml to include a TextBox and Button for setting the DefaultCloneDir in the UI.
- Implemented folder selection functionality in ConfigureWorkspace.axaml.cs to allow users to choose a directory for cloning.
- This closes issue #1145

---------

Co-authored-by: mpagani <massimo.pagani@unitec-group.com>
2025-04-14 16:41:34 +08:00
leo
e89dbd8f43
code_review: PR #1177
- use `Command.ReadToEnd` instead of `Command.Exec` to avoid git trims line endings.
- use `StringBuilder.Append('\n')` instead of `StringBuilder.AppendLine()` to restore original line endings (we split the original diff output by `\n` not `\r')
- there's no need to show file content (the `StreamReader.ReadLine()` will trim line endings)

Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 16:06:52 +08:00
Massimo
81820e7034
refactor: improve diff handling for EOL changes and enhance text diff… (#1177)
* refactor: improve diff handling for EOL changes and enhance text diff display

- Updated `Diff.cs` to streamline whitespace handling in diff arguments.
- Enhanced `DiffContext.cs` to check for EOL changes when old and new hashes differ, creating a text diff if necessary.
- Added support for showing end-of-line symbols in `TextDiffView.axaml.cs` options.

* localization: update translations to include EOF handling in ignore whitespace messages

- Modified the ignore whitespace text in multiple language files to specify that EOF changes are also ignored.
- Ensured consistency across all localization files for the patch application feature.

* revert: Typo in DiffResult comment

* revert: update diff arguments to ignore CR at EOL in whitespace handling (like before changes)

* revert: update translations to remove EOF references in Text.Apply.IgnoreWS and fixed typo in Text.Diff.IgnoreWhitespace (EOF => EOL)

---------

Co-authored-by: mpagani <massimo.pagani@unitec-group.com>
2025-04-14 15:18:45 +08:00
leo
e7f0217a7b
refactor: move binding for ToolTip.IsOpen from code to axaml
Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 11:51:40 +08:00
leo
0cb2ca78fe
code_review: PR #1180
- replace `SetNeedNavigateToUpstreamHead` with `NavigateToBranchDelayed`
- navigate to current HEAD instead of original source HEAD after merge

Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 11:35:50 +08:00
Gadfly
17cf402c78
enhance: navigate to upstream head after fetch, pull, and merge (#1180) 2025-04-14 10:42:34 +08:00
leo
245de9b458
fix: tooltip did not hide after pointer move out (#1178)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 10:40:24 +08:00
leo
48835ca043
project: upgrade AvaloniaUI to 11.2.7
Signed-off-by: leo <longshuang@msn.cn>
2025-04-14 09:53:59 +08:00
AquariusStar
12b1204809
update russian localization (#1181) 2025-04-14 09:47:23 +08:00
leo
cd5a682194
refactor: directly use --exclude=HEAD instead of --exclude=HEA[D]
Signed-off-by: leo <longshuang@msn.cn>
2025-04-11 15:44:02 +08:00
leo
18888de081
refactor: rewrite histories filter to support ref name that contains non-ascii characters (#1175)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-11 15:39:51 +08:00
leo
af350c2fcd
code_review: PR #1174
- keeps all keys in locale files in order
- add தமிழ் (Tamil)

Signed-off-by: leo <longshuang@msn.cn>
2025-04-11 12:31:09 +08:00
தமிழ் நேரம்
accccb5ea3
தமிழ் (Tamil) translation file added (#1174)
* Tamil file added

220

* 0

* Tamil file added

220

0

(cherry picked from commit 355db34db382d17e0b8f0bb6f05b8e2e2f2963d9)
2025-04-11 12:22:48 +08:00
leo
1799de4907
code_review: PR #1173
- rename c-style `file_arg` to `fileArg`
- add missing translations for zh_CN and zh_TW
- re-design conflict view and add tooltip for `USE THEIRS` and `USE MINE`
- re-order unstaged toolbar buttons

Signed-off-by: leo <longshuang@msn.cn>
2025-04-11 10:02:33 +08:00
Göran W
47824dc27a
Add button for running external mergetool on ALL conflicts (#1173)
* Make a few non-translated strings localizable (in Conflict view)

* Add button and wiring to run mergetool on all conflicts

* Corrected spelling and wording in related code and exception msg
2025-04-11 09:33:07 +08:00
leo
3b18ee0b37
code_style: remove unused code
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 20:20:20 +08:00
leo
768b324356
ux: if there are no local changes, show different confirm message (#1143)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 20:06:00 +08:00
leo
506af95963
enhance: new confirm empty commit dialog (#1143)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 20:00:42 +08:00
leo
898a8bc69a
ux: resize confirm commit dialog
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 18:05:53 +08:00
leo
da38b72ee5
ux: disable commit button when commit message is empty
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 18:03:40 +08:00
leo
7cda7211f1
refactor: statistics dialog
- use `%aN+%aE` instead of `%aN` to get commit author
- show user avatar in statistics dialog

Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 21:20:59 +08:00
Göran W
1555abd027
Added new ExternalMerger - Plastic SCM (#1162)
Motivation:
https://m-pixel.com/how-to-use-plastic-scms-merge-tool-with-p4v/
2025-04-07 20:22:53 +08:00
leo
2c5ee4fa99
localization: add keys deleted by sorter tools back
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 20:19:00 +08:00
leo
f5c213060e
localization: keep all keys in order and remove duplicated keys in fr_FR (#1161)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 20:05:24 +08:00
leo
3275dd07d2
enhance: auto stash and re-apply local changes before squashing (#1141)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 16:04:10 +08:00
leo
3049730dd5
feature: add Preferred Merge Mode in repository configure (#1156)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 14:42:46 +08:00
leo
ad9021e892
enhance: allow using + character in branch name (#1152)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 14:07:58 +08:00
leo
fa02c65da5
code_review: PR #1153
- use a single filter for both unstage and staged files
- show confirm dialog if staged files are displayed partially

Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 11:48:38 +08:00
Göran W
a37c6b29ec
In Local Changes, added filter-box in Staged area, to match Unstaged area (#1153)
Also added minimal handling (RaiseException) if trying to commit with active filter (might commit more changes than visible, so disallow).
Minor unification in unstageChanges() to make it more similar to StageChanges().
2025-04-07 10:37:58 +08:00
leo
ac7b02590b
enhance: add comma between date and time (#1150)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 10:23:37 +08:00
leo
8c9cf05c1d
fix: renamed files are missing in commit changes and stash changes (#1151)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-07 10:14:02 +08:00
Sousi Omine
ef106e6909
Add Japanese localization (#1157)
* Initial Japanese translation

Only a small part was translated

* Unspecified words will be in English

When new words are added, they will be displayed in English even if Japanese support is delayed.

* Expanded translation scope

* Expanded translation scope

* Proceed with translation with a focus on overall settings

* Re-translated the outdated settings screen

* Add items that only exist in the latest en_US and remove items that do not exist in en_US

* A lot of translation work done

* A lot more translation work has been done

* ja_JP.axaml has been translated into Japanese

* Fixed three incomplete parts of the Japanese translation
2025-04-07 09:53:20 +08:00
UchiTesting
904432a8f1
style(locale): Add a few translations to the French locale (#1158) 2025-04-07 09:45:02 +08:00
Javier J. Martínez M.
2deb79f8ce
localization: update spanish translations (#1142)
add literal translation for 'CopyFullPath' string
2025-04-02 17:20:33 +08:00
leo
8e55ba1b47
enhance: avoid unhandled exceptions in timer
Signed-off-by: leo <longshuang@msn.cn>
2025-03-31 19:06:10 +08:00
leo
0045e06d78
project: upgrade AvaloniaUI to 11.2.6
Signed-off-by: leo <longshuang@msn.cn>
2025-03-31 09:29:07 +08:00
qiufengshe
07d99f5fd2
enhance: get email hash code opimization (#1137)
(cherry picked from commit 839b92a284d6b103894f6a8a39e5ce1f99bb12fa)
2025-03-31 09:22:57 +08:00
AquariusStar
1482a005bb
localization: update and fix translation russian (#1136) 2025-03-31 09:20:54 +08:00
leo
276d000bcf
refactor: change Copy File Name to Copy Full Path for selected file or change (#1132)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-28 18:01:53 +08:00
leo
56ebc182f2
enhance: try to reinstate not onl the working tree's change, but also the index's ones (#1135)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-28 12:20:36 +08:00
Gadfly
1575ae977e
fix: improve font family name handling by collapsing multiple spaces (#1131) 2025-03-27 20:22:46 +08:00
leo
4fb853d1fd
localization: add translation Text.Configure.IssueTracker.AddSampleAzure for Chinese (#1128)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-26 09:30:41 +08:00