Commit Graph

190 Commits

Author SHA1 Message Date
leo
c08f15827f refactor: move context menu creation from ViewModels to Views (PART 9)
Signed-off-by: leo <longshuang@msn.cn>
2025-07-23 16:15:43 +08:00
leo
8989da7538 enhance: supports commit template with relative path (#1590)
Co-authored-by: King <badly1984@hotmail.com>
Signed-off-by: leo <longshuang@msn.cn>
2025-07-18 10:19:49 +08:00
leo
6ae8c7c759 code_style: move class extensions to App.Extensions.cs to use these extensions anywhere
Signed-off-by: leo <longshuang@msn.cn>
2025-07-11 18:00:21 +08:00
leo
bfd639c001 enhance: external merge tool can only used for both-added or both-modified conflict(s)
Signed-off-by: leo <longshuang@msn.cn>
2025-07-11 14:22:08 +08:00
leo
aa803c3141 code_review: PR #1555
- Remove unnecessary reference to `System.Linq`
- Stop to auto-stage and commit when there is unsolved conflict(s)

Signed-off-by: leo <longshuang@msn.cn>
2025-07-11 09:59:19 +08:00
Sina Hinderks
7aa008372b fix: prevent staging conflicted files (#1555)
It was possible to stage a file with conflicts (double tap, space,
enter, or a stage button).  As a result it would no longer be shown as
conflicted, and the user could no longer solve the conflict in any way
(use theirs, use mine, or execute merge tool), not even after unstaging
again.

Now conflicted files are ignored when staging.
2025-07-11 09:43:49 +08:00
leo
7f838f1f88 feature: add hotkeys to open file with default editor
Signed-off-by: leo <longshuang@msn.cn>
2025-07-08 20:05:37 +08:00
leo
92fb4c8625 feature: add hotkeys to copy file path
Signed-off-by: leo <longshuang@msn.cn>
2025-07-08 17:54:15 +08:00
Nathan Baulch
f2778ee07a ux: hotkey tag on external merger menu items (#1547) 2025-07-08 16:30:49 +08:00
leo
170308e84f code_review: PR #1541
Signed-off-by: leo <longshuang@msn.cn>
2025-07-08 14:36:55 +08:00
oikku
4ef3ed8740 enhance: supports to open Blame (HEAD only) from LOCAL CHANGES (#1541) 2025-07-08 14:15:50 +08:00
leo
8f8ed68744 fix: do not change original commit message
Signed-off-by: leo <longshuang@msn.cn>
2025-07-07 18:04:27 +08:00
leo
c1d6b388f7 code_review: PR #1540
- Fix the issue that `StringReader` traits all outputs of `git ls-tree -z` command as a single-line
- Remove unused namespace using

Signed-off-by: leo <longshuang@msn.cn>
2025-07-07 17:52:19 +08:00
Nathan Baulch
5c9d96fe7a refactor: streamline certain string operations (#1540) 2025-07-07 17:36:41 +08:00
leo
b2aac68600 refactor: rewrite integration for git difftool and git mergetool command
Signed-off-by: leo <longshuang@msn.cn>
2025-07-07 17:16:22 +08:00
leo
8277d7fc1b enhance: open external tool to merge conflicts instead of viewing diff
Signed-off-by: leo <longshuang@msn.cn>
2025-07-07 15:49:02 +08:00
leo
4f4b90d424 ux: re-order context menu items
Signed-off-by: leo <longshuang@msn.cn>
2025-07-07 15:09:05 +08:00
Nathan Baulch
6d068157b4 enhance: diff with merger option on local changes (#1534) 2025-07-07 14:53:09 +08:00
leo
b85f100d84 code_review: PR #1532
- remove `MenuItemExtension`
- display `Tag` as hotkey tips when `InputGesture` is null
- remove `Avalonia.Input` reference in `ViewModels`
- rewrite `InteractiveRebase` view to avoid using `Tag` in menu item

Signed-off-by: leo <longshuang@msn.cn>
2025-07-07 12:44:31 +08:00
Nathan Baulch
dd3c658a0d ux: show a few more shortcuts on menu items (#1532) 2025-07-07 11:38:06 +08:00
Nathan Baulch
3583527026 code_style: general cleanup (#1525) 2025-07-05 15:58:16 +08:00
leo
cdb84c7c43 typo: ShowDailog -> ShowDialog
Signed-off-by: leo <longshuang@msn.cn>
2025-07-04 15:36:45 +08:00
leo
a6ebc1502c refactor: show child-window and modal dialog
Signed-off-by: leo <longshuang@msn.cn>
2025-07-04 14:49:04 +08:00
leo
18b9d982ce refactor: remove ConfigureAwait when we need to go back to UIThread after it
Signed-off-by: leo <longshuang@msn.cn>
2025-07-03 18:42:56 +08:00
leo
40765826ce code_review: PR #1492
- Remove all synchronous method in commands
- `Command.ReadToEndAsync` now is protected method
- Rename `ResultAsync` to `GetResultAsync`
- Call `ConfigureAwait(false)` when there's no context

Signed-off-by: leo <longshuang@msn.cn>
2025-07-03 17:30:06 +08:00
Nathan Baulch
463e304491 feature: async (#1492)
* Async command methods
* Async `Task.Run` where possible
* Remove redundant `Task.Run` in `Sure` methods
* Remove leftover braces and reformat
* Async event handlers as needed
2025-07-03 15:38:39 +08:00
leo
3fe72e919c code_review: PR #1497
Signed-off-by: leo <longshuang@msn.cn>
2025-07-03 11:15:14 +08:00
Nathan Baulch
ec17ea9901 code_style: general cleanup (#1497) 2025-07-03 10:32:03 +08:00
leo
d4723eeea2 feature: supports show commit histories under selected folder (#1470)
Signed-off-by: leo <longshuang@msn.cn>
2025-07-01 16:03:27 +08:00
Nathan Baulch
25e6adeb08 enhance: stream directly to files where possible (#1481) 2025-07-01 12:14:10 +08:00
leo
133b69de4a feature: supports to copy selected folder path in changes and rename searching by file to searching by path (#1470)
Signed-off-by: leo <longshuang@msn.cn>
2025-06-28 12:38:03 +08:00
leo
5f9d181a6c ux: use simple TextBox instead of NameHighlightedTextBlock for commit message histories
Signed-off-by: leo <longshuang@msn.cn>
2025-06-27 17:03:59 +08:00
leo
0e22503b22 feature: warn users when checking out new branch with commits not connected to any branches (#1463)
Signed-off-by: leo <longshuang@msn.cn>
2025-06-26 12:58:31 +08:00
leo
054d5e41f3 feature: warn when creating commit on a detached HEAD (#1462)
Signed-off-by: leo <longshuang@msn.cn>
2025-06-26 10:13:12 +08:00
leo
b519ead5a1 feature: supports to add ignored file(s) locally (saved in $GIT_DIR/info/exclude) (#1447)
Signed-off-by: leo <longshuang@msn.cn>
2025-06-23 17:22:57 +08:00
leo
af2b644792 code_review: PR #1416
- Split `DoubleTapped` into two methods: `CheckoutBranchByDecorator` and `CheckoutBranchByCommit`
- Move `DoubleTappedEvent` from whole ListBox to the row tapped actually
- Do nothing if the decorator double-clicked is HEAD
- Code-style

Signed-off-by: leo <longshuang@msn.cn>
2025-06-19 11:31:04 +08:00
leo
cadcf40d74 feature: support to open selected folder in file manager
Signed-off-by: leo <longshuang@msn.cn>
2025-06-19 09:32:27 +08:00
leo
e81674912c refactor: remove duplicated context menu to ignore untracked files under folder
Signed-off-by: leo <longshuang@msn.cn>
2025-06-19 09:12:27 +08:00
leo
6729d4e896 feature: supports to ignore new files in folder from context menu of selected folder node in change tree (#1432)
Signed-off-by: leo <longshuang@msn.cn>
2025-06-18 22:10:23 +08:00
Göran W
28844c59cf perf: optimize the WorkingCopy.IsChanged() method (#1418)
* There's no need to populate a Dictionary just to diff the the "old" and "cur" Lists of Changes.
* If the two lists are of equal length and no change has occurred, we can assume that they are also reported in equal sort-order (by git-status).
* Thus, we only need to compare the two items at each successive index.
2025-06-13 19:23:20 +08:00
Nathan Baulch
7bba40d03f typos: (#1397) 2025-06-06 12:10:55 +08:00
Göran W
88c38b4139 enhance: unified all file-path normalization - use char-replace, trim trailing slash 2025-06-05 21:17:18 +08:00
leo
6e501b1ee4 feature!: now SourceGit requires git >= 2.25.1
Signed-off-by: leo <longshuang@msn.cn>
2025-06-02 22:38:00 +08:00
leo
7b05b011aa fix: USE THEIRS for AU conflict and USE MINE for UA conflict
Signed-off-by: leo <longshuang@msn.cn>
2025-06-02 13:03:38 +08:00
leo
78f9ae2fa9 refactor: rewrite git restore integration
Signed-off-by: leo <longshuang@msn.cn>
2025-06-02 12:14:22 +08:00
leo
fa004ce31b enhance: unstaged renamed file should use git restore --staged <path> <org_path> instead of git restore --staged <path>
Signed-off-by: leo <longshuang@msn.cn>
2025-06-01 11:19:41 +08:00
leo
60cd210b80 fix: using theirs or mine does not work if it is deleted by ours or theirs
Signed-off-by: leo <longshuang@msn.cn>
2025-05-30 11:13:29 +08:00
leo
e40ca4bbe0 refactor: use git restore instead of git reset to unstage local changes (#1373)
Signed-off-by: leo <longshuang@msn.cn>
2025-05-30 09:43:45 +08:00
leo
46231a759c code_style: run dotnet format
Signed-off-by: leo <longshuang@msn.cn>
2025-05-28 15:17:05 +08:00
leo
0641a22230 feature: allow to reset author when --amend is enabled for committing 2025-05-26 12:28:00 +08:00