- 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>
* 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>
* 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>
- 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>
* 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>
- replace `SetNeedNavigateToUpstreamHead` with `NavigateToBranchDelayed`
- navigate to current HEAD instead of original source HEAD after merge
Signed-off-by: leo <longshuang@msn.cn>
- 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>
* 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