- 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>
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.
- 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>
- 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>
- 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>
- 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>
* 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.
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).