Commit graph

354 commits

Author SHA1 Message Date
leo
f72f1894c3
feature: supports to enable --ignore-cr-at-eol in diff by default
Signed-off-by: leo <longshuang@msn.cn>
2025-04-23 15:34:21 +08:00
leo
345ad06aba
refactor: diff for staged file with --amend enabled (#1231)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 19:20:27 +08:00
leo
78f4809875
fix: no changes were displayed when try to amend a commit without parent (branch first commit) (#1231)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 19:04:40 +08:00
leo
9a6c671a96
refactor: --ignore-cr-at-eol is not necessary when --ignore-all-space is enabled
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 16:50:46 +08:00
leo
34e0ea3bcb
enhance: raise bisect error manually
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 16:07:23 +08:00
leo
df5294bcb7
feature: git bisect support
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 15:45:15 +08:00
qiufengshe
9f18cbca5b
minimize temporary strings for better performance (#1224)
* minimize temporary strings for better performance

* minimize temporary strings for better performance

(cherry picked from commit c9e6a8d4c2d7b5fe03ee13af0a79c5334c23b1c0)
2025-04-22 10:23:20 +08:00
qiufengshe
232482ca92
minimize temporary strings for better performance (#1215)
(cherry picked from commit b4fa80c0939ca198bff8e858a4dc241efd31d558)
2025-04-21 09:44:26 +08:00
leo
75b4a4b294
enhance: record more git command logs
Signed-off-by: leo <longshuang@msn.cn>
2025-04-18 11:29:59 +08:00
leo
892f3b8032
code_style: move SourceGit.CommandExtensions to SourceGit.ViewModels.CommandExtensions
Signed-off-by: leo <longshuang@msn.cn>
2025-04-18 10:24:20 +08:00
leo
104a3f0bbf
code_style: run dotnet format
Signed-off-by: leo <longshuang@msn.cn>
2025-04-17 16:35:18 +08:00
leo
8b39df32cc
feature: git command logs
Signed-off-by: leo <longshuang@msn.cn>
2025-04-17 13:23:56 +08:00
leo
db46de0261
enhance: append character U+26D4 to line when \ No newline at end of file is found in git diff output (#1197)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-16 11:41:40 +08:00
leo
03216fc31e
code_style: run dotnet format and re-order codes
Signed-off-by: leo <longshuang@msn.cn>
2025-04-15 16:30:50 +08:00
leo
be3f418680
fix: no diff content shows with new files (#1193)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-15 11:03: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
Gadfly
17cf402c78
enhance: navigate to upstream head after fetch, pull, and merge (#1180) 2025-04-14 10:42:34 +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
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
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
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
leo
7cd5814410
enhance: better regex for output of Commands.CompareRevisions
Signed-off-by: leo <longshuang@msn.cn>
2025-03-20 21:18:51 +08:00
leo
38d87fa1a1
feature: use git stash show -u --name-status <stash_name> command to query changes in selected stash if git >= 2.32.0
Signed-off-by: leo <longshuang@msn.cn>
2025-03-20 21:12:08 +08:00
leo
760e44877b
fix: wrong split char
Signed-off-by: leo <longshuang@msn.cn>
2025-03-18 12:15:00 +08:00
leo
695db2a319
code_style: run dotnet format
Signed-off-by: leo <longshuang@msn.cn>
2025-03-17 20:57:18 +08:00
leo
8d47bd5cd9
refactor: use --format=<format> instead of --pretty=format:<format>
Signed-off-by: leo <longshuang@msn.cn>
2025-03-17 20:46:01 +08:00
leo
808302ce84
code_review: PR #1106
- Use new syntex `[...]` instead of `new char[] {...}` to create char arrays
- Use `string.ReplaceLineEndings('\n').Split('\n')` instead of `string.Split(['\n', '\r'], StringSplitOptions.RemoveEmptyEntries)` because that the `Signer` part may be missing

Signed-off-by: leo <longshuang@msn.cn>
2025-03-17 20:35:31 +08:00
Gadfly
b930066b5a
fix: improve line splitting to handle both LF and CRLF line endings (#1106) 2025-03-17 19:59:28 +08:00
Gadfly
cea8a90680
refactor: use $GIT_COMMON_DIR instead of cut $GIT_DIR/worktrees (#1103) 2025-03-17 15:56:13 +08:00
leo
6273c01d71
fix: git rev-list raises errors after selected commit in Histories page (#1101)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-17 10:55:54 +08:00
leo
c3e1fb93b6
refactor: fix maxOS PATH env
Signed-off-by: leo <longshuang@msn.cn>
2025-03-14 10:54:09 +08:00
leo
c8bee2f6ba
code_review: PR #1093
Merge deleting branch and tag on remote into `SourceGit.Commands.Push(repo, remote, refname, isDelete)`

Signed-off-by: leo <longshuang@msn.cn>
2025-03-14 09:36:34 +08:00
Michael Pakhantsov
9645b65db6
Explicitly provided fully qualified reference for the git branch, becase can be exists a tag and a branch with identical names (#1093)
Fix push command for branch deletion

Updated the `push` command to use `--delete refs/heads/{name}` instead of `--delete {name}` for clearer branch reference when deleting a remote branch.

Co-authored-by: Michael Pakhantsov <michae.pakhantsov@gmail.com>
2025-03-14 09:26:59 +08:00
leo
bb2284c4c9
refactor: re-write commit searching (part 3)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-12 11:53:24 +08:00
leo
231f3bf668
enhance: use --ancestry-path=<commit_oid> to reduce unnecessary outpus while querying children commits
Signed-off-by: leo <longshuang@msn.cn>
2025-03-12 10:11:00 +08:00
leo
91c5c96afc
fix: accessing dummy in multi-threads throws exception
Signed-off-by: leo <longshuang@msn.cn>
2025-03-11 20:05:34 +08:00
leo
471452646b
refactor: use System.Threading.CancellationToken instead of SourceGit.Commands.Command.CancelToken to cancel fetching information of selected commit
Signed-off-by: leo <longshuang@msn.cn>
2025-03-11 16:53:51 +08:00
leo
0f9087fac6
code_review: PR #1078
- Remove `ForceEnglishLocale` because we want all `git` outputs in English
- Remove locale settings for `ExecuteCustomAction`

Signed-off-by: leo <longshuang@msn.cn>
2025-03-10 20:08:42 +08:00
Gadfly
860f52153b
fix: Force English locale in branch query command. (#1078) 2025-03-10 20:05:37 +08:00
leo
2b2f070c4a
enhance: use --no-optional-locks parameter for git status command
Signed-off-by: leo <longshuang@msn.cn>
2025-03-10 18:29:11 +08:00
leo
df6cbcaa28
fix: app crashed after enable Show children in the commit details (#1072)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-10 11:33:38 +08:00
leo
ca6d41ee60
enhance: try to get stopped at revision info from .git/rebase-merge/head
Signed-off-by: leo <longshuang@msn.cn>
2025-03-07 11:39:15 +08:00
leo
78c0d8d334
fix: both --tags and --no-tags are used in git pull command
Signed-off-by: leo <longshuang@msn.cn>
2025-03-06 10:37:50 +08:00
leo
b75676a7f8
refactor: commit message
- move issue tracker and commit hash links parsing to view models
- parsing links async
- make sure matched hash is a valid commit oid
- disable `CHILDREN` row in submodule info panel

Signed-off-by: leo <longshuang@msn.cn>
2025-03-04 16:04:19 +08:00
GadflyFang
7f8372f6b5
enhance: Handle file mode changes for new/deleted file (#1040) 2025-03-03 10:38:58 +08:00
leo
bdf439a742
enhance: do not show error message if it is empty
Signed-off-by: leo <longshuang@msn.cn>
2025-02-26 16:33:11 +08:00
leo
1d037c7c57
feature: add context menu Save As Patch... for selected stash (#1018)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-24 21:24:53 +08:00