Commit graph

148 commits

Author SHA1 Message Date
leo
6e501b1ee4
feature!: now SourceGit requires git >= 2.25.1
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions
Localization Check / localization-check (push) Waiting to run
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
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions
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
Some checks failed
Continuous Integration / Build (push) Has been cancelled
Continuous Integration / Prepare version string (push) Has been cancelled
Localization Check / localization-check (push) Has been cancelled
Continuous Integration / Package (push) Has been cancelled
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
leo
ef53dd0025
refactor: use a new Models.ChangeState.Conflicted to represent all the unmerged file state (#1359)
Signed-off-by: leo <longshuang@msn.cn>
2025-05-24 20:25:05 +08:00
Göran W
30d4c1008a
enhance: don't show unmerged files in STAGED area (#1359)
Unmerged files (i.e unresolved conflicts) should only appear in the Unstaged area, and not "duplicated" in the Staged area.

Motivation:
* The user-friendly git-status command does not show these as "Changes to be committed".
* If they appear in the Staged area, they are quite redundant since the Diff view will just show "No changes or only EOL changes".
* Some other Git UIs (like Fork) don't show these as Staged items either.

NOTE: According to docs for the git-status "Short Format" (and --porcelain=v1), the XY fields for Unmerged paths do NOT actually represent the Index & Working-tree states, instead they represent the states introduced by each HEAD in the merge (i.e Ours & Theirs, relative to Base).
2025-05-24 19:42:10 +08:00
Göran W
4363b8b6aa
refactor: add new constant Models.Commit.EmptyTreeSHA1 (#1360) 2025-05-24 19:23:28 +08:00
leo
75b7724d44
refactor: implement IDisposable instead of calling custom Cleanup
Signed-off-by: leo <longshuang@msn.cn>
2025-05-20 17:24:00 +08:00
leo
825b74c2a3
refactor: use String.AsSpan(int, int) instead of String.AsSpan().Slice(int, int)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-29 09:44:06 +08:00
leo
951ea8f088
fix: use subject as context menu item header to fix vertical alignment (#1251)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-27 11:20:44 +08:00
qiufengshe
ea680782fe
perf: minimize temporary strings for better performance (#1240)
(cherry picked from commit f4dad2bf551ead5640a500297a4a6f408aef1350)
2025-04-23 21:15:58 +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
87ebe3741d
fix: for init-commit, app will crash with COMMIT & PUSH due to local branch has not been updated (#1229)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-22 18:45:14 +08:00
leo
750ca8ec61
refactor: use custom view locator to create new window/dialog (#1216)
Signed-off-by: leo <longshuang@msn.cn>
(cherry picked from commit 3e6f2b25f15b263e2b84922abc5cf6d621d62a83)
2025-04-21 15:32:21 +08:00
leo
41416a6bed
refactor: use DataTemplates instead of create NamedHighlightedTextBlock manually for menu item (#1216)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-20 11:05:24 +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
0e967ffc8e
fix: pressing Alt+Enter to commit and push in a repository that has no remotes will crash (#1205)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-17 13:30:41 +08:00
leo
8b39df32cc
feature: git command logs
Signed-off-by: leo <longshuang@msn.cn>
2025-04-17 13:23:56 +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
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
506af95963
enhance: new confirm empty commit dialog (#1143)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-08 20:00:42 +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
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
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
f5d6e1264d
refactor: use List<T> instead of AvaloniaList<T> since it is not used for bindings
Signed-off-by: leo <longshuang@msn.cn>
2025-03-11 23:01:34 +08:00
leo
d4bcc60113
enhance: disable CONTINUE button while it is running (#1046)
Signed-off-by: leo <longshuang@msn.cn>
2025-03-04 09:29:07 +08:00
leo
8dd0274bdd
enhance: only write MERGE_MSG when commit message is not null
Signed-off-by: leo <longshuang@msn.cn>
2025-03-01 09:21:52 +08:00
leo
9cf1cba9b7
feature: apply commit message while continue merge/revert (#1027)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-28 19:08:27 +08:00
leo
c6747f72f9
feature: auto-select first change in commit details panel and revision/branch compare panel (#1019)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-25 10:53:42 +08:00
leo
2b4fc64c73
fix: resolve conflict with deleted files does not work (#1009)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-21 10:26:14 +08:00
leo
b5feabfd37
enhance: auto-set commit message while rebasing is inprogress (#1003)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-20 15:42:11 +08:00
leo
0e1dfba7ef
code_review: PR #1007
Signed-off-by: leo <longshuang@msn.cn>
2025-02-20 09:34:03 +08:00
Oleg Kosmakov
cbc2e46beb
fix: Update unstaged filed counter when unstaged files change (#1007)
* Add missing OnPropertyChanged in Cleanup

* Force unstaged count to refresh
2025-02-20 09:31:07 +08:00
leo
aebfffee00
fix: GUI stops refreshing after manually refresh while merge tool is open (#949)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-10 20:51:36 +08:00
leo
8cc056d2af
enhance: supports searching/filtering unstaged changes (#960)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-08 17:16:56 +08:00
leo
a915708db3
refactor: rewrite OpenAI integration
- use `OpenAI` and `Azure.AI.OpenAI`
- use `developer` role instead of `system` for OpenAI's `o1` series models
- use streaming response
- re-design `AIAssistant`

Signed-off-by: leo <longshuang@msn.cn>
2025-02-08 10:03:11 +08:00
leo
8ed7a99923
fix: COMMIT & PUSH should hide when there's no remotes available (#956)
Signed-off-by: leo <longshuang@msn.cn>
2025-02-07 11:45:18 +08:00
GadflyFang
2105fd450d
fix: when upstream is null show CommitAndPush and stop auto push (#955) (#956) 2025-02-07 11:30:14 +08:00
GadflyFang
a4157e11e6
fix: Improve in-progress rebase handling (#933)
* fix: Improve in-progress rebase handling

* fix: Close merge popup even if there are conflicts (#941)
2025-02-06 10:00:35 +08:00
leo
49ee9c8e33
ux: move --signoff toggle from repository configuration window to commit options bar
Signed-off-by: leo <longshuang@msn.cn>
2025-01-24 14:45:49 +08:00
leo
cb4ad63ba3
fix: discarding changes with selected changes should never be traited as Discard all changes (#904) 2025-01-22 10:52:01 +08:00
wl2776
6e5626f267
fix: several typos in source code (#895) 2025-01-13 10:11:28 +08:00
leo
b26838ff68
refactor: git version related commands
* use `--pathspec-from-file=<FILE>` in `git add` command if git >= 2.25.0
* use `--pathspec-from-file=<FILE>` in `git stash push` command if git >= 2.26.0
* use `--staged` in `git stash push` command only if git >= 2.35.0
2025-01-11 17:29:38 +08:00
leo
a3d744f426
code_style: run dotnet format 2025-01-08 21:44:35 +08:00