Compare commits

..

No commits in common. "0e37e018efee01b83d0361a028cf7942270807ce" and "4a3ef6267f38b96f8542915624124a32388a869b" have entirely different histories.

59 changed files with 343 additions and 1250 deletions

View file

@ -25,7 +25,6 @@ jobs:
with:
version: ${{ needs.version.outputs.version }}
publish-packages:
needs: [package, version]
name: Publish Packages
uses: ./.github/workflows/publish-packages.yml
secrets:

View file

@ -47,7 +47,7 @@
## Translation Status
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-97.50%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-97.78%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-95.00%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.56%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.81%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-97.92%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.58%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.86%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-97.03%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-97.45%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-98.87%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
## How to Use
@ -98,33 +98,6 @@ For **macOS** users:
For **Linux** users:
* For Debian/Ubuntu based distributions, you can add the `sourcegit` repository by following:
You may need to install curl and/or gpg first, if you're on a very minimal host:
```shell
apt update && apt install curl gpg -y
```
Install the registry signing key:
```shell
curl -fsSL "https://packages.buildkite.com/sourcegit/sourcegit-deb/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg
```
Configure the source:
```shell
echo -e "deb [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main\ndeb-src [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main" > /etc/apt/sources.list.d/buildkite-sourcegit-sourcegit-deb.list
```
Update your local repository and install the package:
```shell
apt update && apt install sourcegit
```
* For RHEL/Fedora based distributions, you can add the `sourcegit` repository by following:
Configure the source:
```shell
sudo sh -c 'echo -e "[sourcegit-rpm]\nname=sourcegit-rpm\nbaseurl=https://packages.buildkite.com/sourcegit/sourcegit-rpm/rpm_any/rpm_any/\$basearch\nenabled=1\nrepo_gpgcheck=1\ngpgcheck=0\ngpgkey=https://packages.buildkite.com/sourcegit/sourcegit-rpm/gpgkey\npriority=1"' > /etc/yum.repos.d/sourcegit-rpm.repo
```
Install the package with this command:
```shell
sudo dnf install -y sourcegit
```
* `Appimage` files can be found on [AppimageHub](https://appimage.github.io/SourceGit/)
* `xdg-open` must be installed to support open native file manager.
* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux.
* Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI.

View file

@ -1,81 +1,37 @@
### de_DE.axaml: 97.50%
### de_DE.axaml: 99.58%
<details>
<summary>Missing Keys</summary>
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.Diff.UseBlockNavigation
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
- Text.WorkingCopy.CommitToEdit
</details>
### es_ES.axaml: 97.78%
### es_ES.axaml: 99.86%
<details>
<summary>Missing Keys</summary>
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.Diff.UseBlockNavigation
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
</details>
### fr_FR.axaml: 95.00%
### fr_FR.axaml: 97.03%
<details>
<summary>Missing Keys</summary>
- Text.BranchCM.MergeMultiBranches
- Text.CherryPick.AppendSourceToMessage
- Text.CherryPick.Mainline.Tips
- Text.CommitCM.CherryPickMultiple
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.Appearance.FontSize
- Text.Preference.Appearance.FontSize.Default
- Text.Preference.Appearance.FontSize.Editor
@ -88,22 +44,18 @@
- Text.Repository.HistoriesOrder
- Text.Repository.HistoriesOrder.ByDate
- Text.Repository.HistoriesOrder.Topo
- Text.Repository.Skip
- Text.ScanRepositories
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit
</details>
### it_IT.axaml: 95.56%
### it_IT.axaml: 97.45%
<details>
<summary>Missing Keys</summary>
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.CommitDetail.Info.Children
- Text.Configure.IssueTracker.AddSampleGitLabMergeRequest
@ -111,16 +63,6 @@
- Text.Configure.OpenAI.Preferred.Tip
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.General.ShowChildren
- Text.Repository.FilterCommits
- Text.Repository.FilterCommits.Default
@ -129,66 +71,36 @@
- Text.Repository.HistoriesOrder
- Text.Repository.HistoriesOrder.ByDate
- Text.Repository.HistoriesOrder.Topo
- Text.Repository.Skip
- Text.SHALinkCM.CopySHA
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit
</details>
### pt_BR.axaml: 96.81%
### pt_BR.axaml: 98.87%
<details>
<summary>Missing Keys</summary>
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.CommitDetail.Files.Search
- Text.CommitDetail.Info.Children
- Text.Diff.UseBlockNavigation
- Text.Fetch.Force
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Preference.General.ShowChildren
- Text.Repository.FilterCommits
- Text.Repository.Skip
- Text.SHALinkCM.NavigateTo
- Text.WorkingCopy.CommitToEdit
</details>
### ru_RU.axaml: 97.92%
### ru_RU.axaml: 100.00%
<details>
<summary>Missing Keys</summary>
- Text.BranchCM.MergeMultiBranches
- Text.CommitCM.Merge
- Text.CommitCM.MergeMultiple
- Text.FileCM.ResolveUsing
- Text.Hotkeys.Global.Clone
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
- Text.InProgress.Rebase.StoppedAt
- Text.InProgress.Revert.Head
- Text.Merge.Source
- Text.MergeMultiple
- Text.MergeMultiple.CommitChanges
- Text.MergeMultiple.Strategy
- Text.MergeMultiple.Targets
- Text.Repository.Skip
</details>

View file

@ -1 +1 @@
8.43
8.42

View file

@ -2,15 +2,6 @@
{
public static class Branch
{
public static string ShowCurrent(string repo)
{
var cmd = new Command();
cmd.WorkingDirectory = repo;
cmd.Context = repo;
cmd.Args = $"branch --show-current";
return cmd.ReadToEnd().StdOut.Trim();
}
public static bool Create(string repo, string name, string basedOn)
{
var cmd = new Command();

View file

@ -74,11 +74,7 @@ namespace SourceGit.Commands
}
if (string.IsNullOrEmpty(e.Data))
{
errs.Add(string.Empty);
return;
}
if (TraitErrorAsOutput)
OnReadline(e.Data);
@ -93,7 +89,6 @@ namespace SourceGit.Commands
return;
if (REG_PROGRESS().IsMatch(e.Data))
return;
errs.Add(e.Data);
};
@ -104,8 +99,12 @@ namespace SourceGit.Commands
catch (Exception e)
{
if (RaiseError)
Dispatcher.UIThread.Post(() => App.RaiseException(Context, e.Message));
{
Dispatcher.UIThread.Invoke(() =>
{
App.RaiseException(Context, e.Message);
});
}
return false;
}
@ -116,15 +115,15 @@ namespace SourceGit.Commands
int exitCode = proc.ExitCode;
proc.Close();
if (!isCancelled && exitCode != 0)
if (!isCancelled && exitCode != 0 && errs.Count > 0)
{
if (RaiseError)
{
var errMsg = string.Join("\n", errs);
if (!string.IsNullOrWhiteSpace(errMsg))
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
Dispatcher.UIThread.Invoke(() =>
{
App.RaiseException(Context, string.Join("\n", errs));
});
}
return false;
}

View file

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace SourceGit.Commands
{
@ -15,29 +13,6 @@ namespace SourceGit.Commands
Args = $"merge --progress {source} {mode}";
}
public Merge(string repo, List<string> targets, bool autoCommit, string strategy, Action<string> outputHandler)
{
_outputHandler = outputHandler;
WorkingDirectory = repo;
Context = repo;
TraitErrorAsOutput = true;
var builder = new StringBuilder();
builder.Append("merge --progress ");
if (!string.IsNullOrEmpty(strategy))
builder.Append($"--strategy={strategy} ");
if (!autoCommit)
builder.Append("--no-commit ");
foreach (var t in targets)
{
builder.Append(t);
builder.Append(' ');
}
Args = builder.ToString();
}
protected override void OnReadline(string line)
{
_outputHandler?.Invoke(line);

View file

@ -52,28 +52,16 @@ namespace SourceGit.Commands
_current.Commit.CommitterTime = ulong.Parse(line);
break;
default:
var boundary = rs.StdOut.IndexOf(_boundary, end + 1);
if (boundary > end)
{
_current.Message = rs.StdOut.Substring(start, boundary - start - 1);
end = boundary + _boundary.Length;
}
if (line.Equals(_boundary, StringComparison.Ordinal))
nextPartIdx = -1;
else
{
_current.Message = rs.StdOut.Substring(start);
end = rs.StdOut.Length - 2;
}
nextPartIdx = -1;
_current.Message += line;
break;
}
nextPartIdx++;
start = end + 1;
if (start >= rs.StdOut.Length - 1)
break;
end = rs.StdOut.IndexOf('\n', start);
}

View file

@ -1,24 +0,0 @@
using System.Collections.Generic;
namespace SourceGit.Models
{
public class MergeStrategy
{
public string Name { get; internal set; }
public string Desc { get; internal set; }
public string Arg { get; internal set; }
public static List<MergeStrategy> ForMultiple { get; private set; } = [
new MergeStrategy("Default", "Let Git automatically select a strategy", string.Empty),
new MergeStrategy("Octopus", "Attempt merging multiple heads", "octopus"),
new MergeStrategy("Ours", "Record the merge without modifying the tree", "ours"),
];
public MergeStrategy(string n, string d, string a)
{
Name = n;
Desc = d;
Arg = a;
}
}
}

View file

@ -6,7 +6,7 @@ namespace SourceGit.Models
{
public partial class Remote
{
[GeneratedRegex(@"^https?://([-a-zA-Z0-9:%._\+~#=]+@)?[-a-zA-Z0-9:%._\+~#=]{1,256}(\.[a-zA-Z0-9()]{1,6})?(:[0-9]{1,5})?\b(/[-a-zA-Z0-9()@:%_\+.~#?&=]+)+(\.git)?$")]
[GeneratedRegex(@"^https?://([-a-zA-Z0-9:%._\+~#=]+@)?[-a-zA-Z0-9:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(:[0-9]{1,5})?\b(/[-a-zA-Z0-9()@:%_\+.~#?&=]*)*(\.git)?$")]
private static partial Regex REG_HTTPS();
[GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-/~%]+/[\w\-\.%]+(\.git)?$")]
private static partial Regex REG_SSH1();

View file

@ -15,9 +15,9 @@
<StreamGeometry x:Key="Icons.Clean">M797 829a49 49 0 1049 49 49 49 0 00-49-49zm147-114A49 49 0 10992 764a49 49 0 00-49-49zM928 861a49 49 0 1049 49A49 49 0 00928 861zm-5-586L992 205 851 64l-71 71a67 67 0 00-94 0l235 235a67 67 0 000-94zm-853 128a32 32 0 00-32 50 1291 1291 0 0075 112L288 552c20 0 25 21 8 37l-93 86a1282 1282 0 00120 114l100-32c19-6 28 15 14 34l-40 55c26 19 53 36 82 53a89 89 0 00115-20 1391 1391 0 00256-485l-188-188s-306 224-595 198z</StreamGeometry>
<StreamGeometry x:Key="Icons.Clone">M1280 704c0 141-115 256-256 256H288C129 960 0 831 0 672c0-126 80-232 192-272A327 327 0 01192 384c0-177 143-320 320-320 119 0 222 64 277 160C820 204 857 192 896 192c106 0 192 86 192 192 0 24-5 48-13 69C1192 477 1280 580 1280 704zm-493-128H656V352c0-18-14-32-32-32h-96c-18 0-32 14-32 32v224h-131c-29 0-43 34-23 55l211 211c12 12 33 12 45 0l211-211c20-20 6-55-23-55z</StreamGeometry>
<StreamGeometry x:Key="Icons.Code">M853 102H171C133 102 102 133 102 171v683C102 891 133 922 171 922h683C891 922 922 891 922 853V171C922 133 891 102 853 102zM390 600l-48 48L205 512l137-137 48 48L301 512l88 88zM465 819l-66-18L559 205l66 18L465 819zm218-171L634 600 723 512l-88-88 48-48L819 512 683 649z</StreamGeometry>
<StreamGeometry x:Key="Icons.CodeBlock">M684 736 340 736l0-53 344 1-0 53zM552 565l-213-2 0-53 212 2-0 53zM684 392 340 392l0-53 344 1-0 53zM301 825c-45 0-78-9-100-27-22-18-33-43-33-75v-116c0-22-4-37-12-45-7-9-20-13-40-13v-61c19 0 32-4 40-12 8-9 12-24 12-46v-116c0-32 11-57 33-75 22-18 56-27 100-27h24v61h-24a35 35 0 00-27 12 41 41 0 00-11 29v116c0 35-10 60-31 75a66 66 0 01-31 14c11 2 22 6 31 14 20 17 31 42 31 75v116c0 12 4 22 11 29 7 8 16 12 27 12h24v61h-24zM701 764h24c10 0 19-4 27-12a41 41 0 0011-29v-116c0-33 10-58 31-75 9-7 19-12 31-14a66 66 0 01-31-14c-20-15-31-40-31-75v-116a41 41 0 00-11-29 35 35 0 00-27-12h-24v-61h24c45 0 78 9 100 27 22 18 33 43 33 75v116c0 22 4 37 11 46 8 8 21 12 40 12v61c-19 0-33 4-40 13-7 8-11 23-11 45v116c0 32-11 57-33 75-22 18-55 27-100 27h-24v-61z</StreamGeometry>
<StreamGeometry x:Key="Icons.CodeBlock">M320 171A21 21 0 00299 192v213c0 49-32 85-61 107 30 22 61 58 61 107V832A21 21 0 00320 853h85v85H320A107 107 0 01213 832V619c0-11-8-26-32-42a157 157 0 00-33-17c-11-4-18-5-20-5v-85c2 0 9-1 20-5a157 157 0 0033-17c24-16 32-32 32-42V192A107 107 0 01320 85h85v85H320zm384 0h-85V85H704A107 107 0 01811 192v213c0 11 8 26 32 42 11 7 22 13 33 17 11 4 18 5 20 5v85c-2 0-9 1-20 5a157 157 0 00-33 17c-24 16-32 31-32 42V832A107 107 0 01704 939h-85v-85H704A21 21 0 00725 832V619c0-49 32-85 61-107-30-22-61-58-61-107V192A21 21 0 00704 171z</StreamGeometry>
<StreamGeometry x:Key="Icons.ColorPicker">M128 854h768v86H128zM390 797c13 13 29 19 48 19s35-6 45-19l291-288c26-22 26-64 0-90L435 83l-61 61L426 192l-272 269c-22 22-22 64 0 90l237 246zm93-544 211 211-32 32H240l243-243zM707 694c0 48 38 86 86 86 48 0 86-38 86-86 0-22-10-45-26-61L794 576l-61 61c-13 13-26 35-26 58z</StreamGeometry>
<StreamGeometry x:Key="Icons.Commit">M0 512M1024 512M512 0M512 1024M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</StreamGeometry>
<StreamGeometry x:Key="Icons.Commit">M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</StreamGeometry>
<StreamGeometry x:Key="Icons.CommitMessageGenerator">M796 561a5 5 0 014 7l-39 90a5 5 0 004 7h100a5 5 0 014 8l-178 247a5 5 0 01-9-4l32-148a5 5 0 00-5-6h-89a5 5 0 01-4-7l86-191a5 5 0 014-3h88zM731 122a73 73 0 0173 73v318a54 54 0 00-8-1H731V195H244v634h408l-16 73H244a73 73 0 01-73-73V195a73 73 0 0173-73h488zm-219 366v73h-195v-73h195zm146-146v73H317v-73h341z</StreamGeometry>
<StreamGeometry x:Key="Icons.Compare">M645 448l64 64 220-221L704 64l-64 64 115 115H128v90h628zM375 576l-64-64-220 224L314 960l64-64-116-115H896v-90H262z</StreamGeometry>
<StreamGeometry x:Key="Icons.Conflict">M608 0q48 0 88 23t63 63 23 87v70h55q35 0 67 14t57 38 38 57 14 67V831q0 34-14 66t-38 57-57 38-67 13H426q-34 0-66-13t-57-38-38-57-14-66v-70h-56q-34 0-66-14t-57-38-38-57-13-67V174q0-47 23-87T109 23 196 0h412m175 244H426q-46 0-86 22T278 328t-26 85v348H608q47 0 86-22t63-62 25-85l1-348m-269 318q18 0 31 13t13 31-13 31-31 13-31-13-13-31 13-31 31-13m0-212q13 0 22 9t11 22v125q0 14-9 23t-22 10-23-7-11-22l-1-126q0-13 10-23t23-10z</StreamGeometry>

View file

@ -389,10 +389,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Verwerfen</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Initialisiere Repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Pfad:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert wird durchgeführt.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert wird durchgeführt. Drücke 'Abbrechen' um den originalen HEAD wiederherzustellen.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interaktiver Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ziel Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Auf:</x:String>
@ -403,6 +403,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Branch mergen</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Ziel-Branch:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Merge Option:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Quell-Branch:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Bewege Repository Knoten</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Wähle Vorgänger-Knoten für:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
@ -561,6 +562,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Aktualisiern</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTES</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">REMOTE HINZUFÜGEN</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">KONFLIKTE BEHEBEN</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Commit suchen</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Dateiname</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String>

View file

@ -58,7 +58,6 @@
<x:String x:Key="Text.BranchCM.FetchInto" xml:space="preserve">Fetch ${0}$ into ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.Finish" xml:space="preserve">Git Flow - Finish ${0}$</x:String>
<x:String x:Key="Text.BranchCM.Merge" xml:space="preserve">Merge ${0}$ into ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.MergeMultiBranches" xml:space="preserve">Merge selected {0} branches into current</x:String>
<x:String x:Key="Text.BranchCM.Pull" xml:space="preserve">Pull ${0}$</x:String>
<x:String x:Key="Text.BranchCM.PullInto" xml:space="preserve">Pull ${0}$ into ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.Push" xml:space="preserve">Push ${0}$</x:String>
@ -102,7 +101,7 @@
<x:String x:Key="Text.Clone.RemoteURL" xml:space="preserve">Repository URL:</x:String>
<x:String x:Key="Text.Close" xml:space="preserve">CLOSE</x:String>
<x:String x:Key="Text.CodeEditor" xml:space="preserve">Editor</x:String>
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">Cherry-Pick Commit</x:String>
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">Cherry-Pick This Commit</x:String>
<x:String x:Key="Text.CommitCM.CherryPickMultiple" xml:space="preserve">Cherry-Pick ...</x:String>
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">Checkout Commit</x:String>
<x:String x:Key="Text.CommitCM.CompareWithHead" xml:space="preserve">Compare with HEAD</x:String>
@ -110,16 +109,14 @@
<x:String x:Key="Text.CommitCM.CopyInfo" xml:space="preserve">Copy Info</x:String>
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">Copy SHA</x:String>
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">Custom Action</x:String>
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">Interactively Rebase ${0}$ on Here</x:String>
<x:String x:Key="Text.CommitCM.Merge" xml:space="preserve">Merge to ${0}$</x:String>
<x:String x:Key="Text.CommitCM.MergeMultiple" xml:space="preserve">Merge ...</x:String>
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">Rebase ${0}$ on Here</x:String>
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">Interactive Rebase ${0}$ to Here</x:String>
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">Rebase ${0}$ to Here</x:String>
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">Reset ${0}$ to Here</x:String>
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">Revert Commit</x:String>
<x:String x:Key="Text.CommitCM.Reword" xml:space="preserve">Reword</x:String>
<x:String x:Key="Text.CommitCM.SaveAsPatch" xml:space="preserve">Save as Patch...</x:String>
<x:String x:Key="Text.CommitCM.Squash" xml:space="preserve">Squash into Parent</x:String>
<x:String x:Key="Text.CommitCM.SquashCommitsSinceThis" xml:space="preserve">Squash Children into Here</x:String>
<x:String x:Key="Text.CommitCM.SquashCommitsSinceThis" xml:space="preserve">Squash Child Commits to Here</x:String>
<x:String x:Key="Text.CommitDetail.Changes" xml:space="preserve">CHANGES</x:String>
<x:String x:Key="Text.CommitDetail.Changes.Search" xml:space="preserve">Search Changes...</x:String>
<x:String x:Key="Text.CommitDetail.Files" xml:space="preserve">FILES</x:String>
@ -282,7 +279,6 @@
<x:String x:Key="Text.FileCM.DiscardMulti" xml:space="preserve">Discard {0} files...</x:String>
<x:String x:Key="Text.FileCM.DiscardSelectedLines" xml:space="preserve">Discard Changes in Selected Line(s)</x:String>
<x:String x:Key="Text.FileCM.OpenWithExternalMerger" xml:space="preserve">Open External Merge Tool</x:String>
<x:String x:Key="Text.FileCM.ResolveUsing" xml:space="preserve">Resolve Using ${0}$</x:String>
<x:String x:Key="Text.FileCM.SaveAsPatch" xml:space="preserve">Save as Patch...</x:String>
<x:String x:Key="Text.FileCM.Stage" xml:space="preserve">Stage</x:String>
<x:String x:Key="Text.FileCM.StageMulti" xml:space="preserve">Stage {0} files</x:String>
@ -361,7 +357,6 @@
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Keyboard Shortcuts Reference</x:String>
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBAL</x:String>
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">Cancel current popup</x:String>
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">Clone new repository</x:String>
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">Close current page</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">Go to previous page</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">Go to next page</x:String>
@ -393,14 +388,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Discard</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Initialize Repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Path:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in progress.</x:String>
<x:String x:Key="Text.InProgress.CherryPick.Head" xml:space="preserve">Processing commit</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress.</x:String>
<x:String x:Key="Text.InProgress.Merge.Operating" xml:space="preserve">Operating</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress.</x:String>
<x:String x:Key="Text.InProgress.Rebase.StoppedAt" xml:space="preserve">Stopped at</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress.</x:String>
<x:String x:Key="Text.InProgress.Revert.Head" xml:space="preserve">Reverting commit</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress. Press 'Abort' to restore original HEAD.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Interactive Rebase</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Target Branch:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">On:</x:String>
@ -411,11 +402,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Merge Branch</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Into:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Merge Option:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Source:</x:String>
<x:String x:Key="Text.MergeMultiple" xml:space="preserve">Merge (Multiple)</x:String>
<x:String x:Key="Text.MergeMultiple.CommitChanges" xml:space="preserve">Commit all changes</x:String>
<x:String x:Key="Text.MergeMultiple.Strategy" xml:space="preserve">Strategy:</x:String>
<x:String x:Key="Text.MergeMultiple.Targets" xml:space="preserve">Targets:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Source Branch:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Move Repository Node</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Select parent node for:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
@ -574,6 +561,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Refresh</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTES</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">ADD REMOTE</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOLVE</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Search Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">File</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Message</x:String>
@ -581,7 +569,6 @@
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Author &amp; Committer</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">Current Branch</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Show Tags as Tree</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">SKIP</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistics</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULES</x:String>
<x:String x:Key="Text.Repository.Submodules.Add" xml:space="preserve">ADD SUBMODULE</x:String>

View file

@ -392,10 +392,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Descartar</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Inicializar Repositorio</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Ruta:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en progreso.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge en progreso.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase en progreso.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert en progreso.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert en progreso. Presiona 'Abort' para restaurar el HEAD original.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interactivo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Rama Objetivo:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">En:</x:String>
@ -404,6 +404,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Merge Rama</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">En:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Opción de Merge:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Rama Fuente:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Mover Nodo del Repositorio</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Seleccionar nodo padre para:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nombre:</x:String>
@ -563,6 +564,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Refrescar</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTOS</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">AÑADIR REMOTO</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOLVER</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Buscar Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Archivo</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Mensaje</x:String>

View file

@ -386,10 +386,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Rejeter</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Initialiser le repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Chemin :</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en cours.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick en cours. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge request in progress. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in progress. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in progress. Appuyer sur 'Abort' pour restaurer le HEAD d'origine.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase interactif</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Branche cible :</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Sur :</x:String>
@ -400,6 +400,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Merger la branche </x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Dans :</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Option de merge:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Branche source :</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Déplacer le noeud du repository</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Sélectionnier le noeud parent pour :</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nom :</x:String>
@ -548,6 +549,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Rafraîchir</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">DEPOTS DISTANTS</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">AJOUTER DEPOT DISTANT</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOUDRE</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Rechercher un commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Fichier</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Message</x:String>

View file

@ -357,7 +357,6 @@
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Riferimento Scorciatoie da Tastiera</x:String>
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBALE</x:String>
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">Annulla il popup corrente</x:String>
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">Clona una nuova repository</x:String>
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">Chiudi la pagina corrente</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">Vai alla pagina precedente</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">Vai alla pagina successiva</x:String>
@ -389,10 +388,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Scarta</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Inizializza Repository</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Percorso:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in corso.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Richiesta di merge in corso.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in corso.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in corso.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Richiesta di merge in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert in corso. Premi 'Annulla' per ripristinare l'HEAD originale.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interattivo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Branch di destinazione:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Su:</x:String>
@ -403,6 +402,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Unisci Branch</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">In:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Opzione di Merge:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Branch Sorgente:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Sposta Nodo Repository</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Seleziona nodo padre per:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nome:</x:String>
@ -554,6 +554,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Aggiorna</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTI</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">AGGIUNGI REMOTO</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RISOLVI</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Cerca Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">File</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Messaggio</x:String>

View file

@ -412,10 +412,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Descartar</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Inicializar Repositório</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Caminho:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick em andamento.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge em andamento.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase em andamento.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert em andamento.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Cherry-Pick em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Merge em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Rebase em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Revert em andamento. Pressione 'Abort' para restaurar o HEAD original.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Rebase Interativo</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Ramo Alvo:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">Em:</x:String>
@ -426,6 +426,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Mesclar Ramo</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">Para:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Opção de Mesclagem:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Ramo de Origem:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Mover nó do repositório</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Selecionar nó pai para:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Nome:</x:String>
@ -582,6 +583,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Atualizar</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">REMOTOS</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">ADICIONAR REMOTO</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">RESOLVER</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Pesquisar Commit</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Arquivo</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Mensagem</x:String>

View file

@ -392,10 +392,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Отклонить</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">Инициализировать хранилище</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">Путь:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Выполняется частичный забор.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Выполняет запрос слияния.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Выполняется перенос.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Выполняется возврат.</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">Выполняется частичный забор. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">Выполняет запрос слияния. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">Выполняется перенос. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">Выполняется возврат. Нажмите «Отказ» для восстановления заголовка.</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">Интерактивное перемещение</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">Целевая ветка:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">На:</x:String>
@ -406,6 +406,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">Слить ветку</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">В:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">Опции слияния:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">Исходная ветка:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">Переместить узел хранилища</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">Выбрать родительский узел для:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">Имя:</x:String>
@ -565,6 +566,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">Обновить</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">ВНЕШНИЕ ХРАНИЛИЩА</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">ДОБАВИТЬ ВНЕШНЕЕ ХРАНИЛИЩЕ</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">РАЗРЕШИТЬ</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">Поиск фиксации</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">Файл</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Сообщение</x:String>

View file

@ -61,7 +61,6 @@
<x:String x:Key="Text.BranchCM.FetchInto" xml:space="preserve">拉取(fetch) ${0}$ 至 ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.Finish" xml:space="preserve">GIT工作流 - 完成 ${0}$</x:String>
<x:String x:Key="Text.BranchCM.Merge" xml:space="preserve">合并 ${0}$ 到 ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.MergeMultiBranches" xml:space="preserve">合并 {0} 个分支到当前分支</x:String>
<x:String x:Key="Text.BranchCM.Pull" xml:space="preserve">拉回(pull) ${0}$</x:String>
<x:String x:Key="Text.BranchCM.PullInto" xml:space="preserve">拉回(pull) ${0}$ 内容至 ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.Push" xml:space="preserve">推送(push)${0}$</x:String>
@ -114,8 +113,6 @@
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">复制提交指纹</x:String>
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">自定义操作</x:String>
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">交互式变基(rebase -i) ${0}$ 到此处</x:String>
<x:String x:Key="Text.CommitCM.Merge" xml:space="preserve">合并(merge)此提交至 ${0}$</x:String>
<x:String x:Key="Text.CommitCM.MergeMultiple" xml:space="preserve">合并(merge)...</x:String>
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">变基(rebase) ${0}$ 到此处</x:String>
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">重置(reset) ${0}$ 到此处</x:String>
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">回滚此提交</x:String>
@ -285,7 +282,6 @@
<x:String x:Key="Text.FileCM.DiscardMulti" xml:space="preserve">放弃 {0} 个文件的更改...</x:String>
<x:String x:Key="Text.FileCM.DiscardSelectedLines" xml:space="preserve">放弃选中的更改</x:String>
<x:String x:Key="Text.FileCM.OpenWithExternalMerger" xml:space="preserve">使用外部合并工具打开</x:String>
<x:String x:Key="Text.FileCM.ResolveUsing" xml:space="preserve">应用 ${0}$</x:String>
<x:String x:Key="Text.FileCM.SaveAsPatch" xml:space="preserve">另存为补丁...</x:String>
<x:String x:Key="Text.FileCM.Stage" xml:space="preserve">暂存(add)</x:String>
<x:String x:Key="Text.FileCM.StageMulti" xml:space="preserve">暂存(add){0} 个文件</x:String>
@ -364,7 +360,6 @@
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快捷键参考</x:String>
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全局快捷键</x:String>
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消弹出面板</x:String>
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">克隆远程仓库</x:String>
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">关闭当前页面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切换到上一个页面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切换到下一个页面</x:String>
@ -396,14 +391,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">丢弃</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">初始化新仓库</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">路径 </x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">挑选Cherry-Pick操作进行中。</x:String>
<x:String x:Key="Text.InProgress.CherryPick.Head" xml:space="preserve">正在处理提交</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合并操作进行中。</x:String>
<x:String x:Key="Text.InProgress.Merge.Operating" xml:space="preserve">正在处理</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">变基Rebase操作进行中。</x:String>
<x:String x:Key="Text.InProgress.Rebase.StoppedAt" xml:space="preserve">当前停止于</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">回滚提交操作进行中。</x:String>
<x:String x:Key="Text.InProgress.Revert.Head" xml:space="preserve">正在回滚提交</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">挑选Cherry-Pick操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合并操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">变基Rebase操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">回滚提交操作进行中。点击【终止】回滚到操作前的状态。</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">交互式变基</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目标分支 </x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交 </x:String>
@ -414,11 +405,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">合并分支</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">目标分支 </x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">合并方式 </x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合并目标 </x:String>
<x:String x:Key="Text.MergeMultiple" xml:space="preserve">合并(多目标)</x:String>
<x:String x:Key="Text.MergeMultiple.CommitChanges" xml:space="preserve">提交变化</x:String>
<x:String x:Key="Text.MergeMultiple.Strategy" xml:space="preserve">合并策略 </x:String>
<x:String x:Key="Text.MergeMultiple.Targets" xml:space="preserve">目标列表 </x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合并分支 </x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">调整仓库分组</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">请选择目标分组:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">名称 </x:String>
@ -578,6 +565,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">重新加载</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">远程列表</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">添加远程</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">解决冲突</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">查找提交</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">文件</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">提交信息</x:String>
@ -585,7 +573,6 @@
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">作者及提交者</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">仅在当前分支中查找</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">以树型结构展示</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">跳过此提交</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">提交统计</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">子模块列表</x:String>
<x:String x:Key="Text.Repository.Submodules.Add" xml:space="preserve">添加子模块</x:String>

View file

@ -61,7 +61,6 @@
<x:String x:Key="Text.BranchCM.FetchInto" xml:space="preserve">提取 (fetch) ${0}$ 到 ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.Finish" xml:space="preserve">Git 工作流 - 完成 ${0}$</x:String>
<x:String x:Key="Text.BranchCM.Merge" xml:space="preserve">合併 ${0}$ 到 ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.MergeMultiBranches" xml:space="preserve">合併 {0} 個分支到目前分支</x:String>
<x:String x:Key="Text.BranchCM.Pull" xml:space="preserve">拉取 (pull) ${0}$</x:String>
<x:String x:Key="Text.BranchCM.PullInto" xml:space="preserve">拉取 (pull) ${0}$ 內容至 ${1}$...</x:String>
<x:String x:Key="Text.BranchCM.Push" xml:space="preserve">推送 (push) ${0}$</x:String>
@ -114,8 +113,6 @@
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">複製提交編號</x:String>
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">自訂動作</x:String>
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">互動式重定基底 (rebase -i) ${0}$ 到此處</x:String>
<x:String x:Key="Text.CommitCM.Merge" xml:space="preserve">合併 (merge) 此提交到 ${0}$</x:String>
<x:String x:Key="Text.CommitCM.MergeMultiple" xml:space="preserve">合併 (merge)...</x:String>
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">重定基底 (rebase) ${0}$ 到此處</x:String>
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">重設 (reset) ${0}$ 到此處</x:String>
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">復原此提交</x:String>
@ -285,7 +282,6 @@
<x:String x:Key="Text.FileCM.DiscardMulti" xml:space="preserve">捨棄已選的 {0} 個檔案變更...</x:String>
<x:String x:Key="Text.FileCM.DiscardSelectedLines" xml:space="preserve">捨棄選取的變更</x:String>
<x:String x:Key="Text.FileCM.OpenWithExternalMerger" xml:space="preserve">使用外部合併工具開啟</x:String>
<x:String x:Key="Text.FileCM.ResolveUsing" xml:space="preserve">使用 ${0}$</x:String>
<x:String x:Key="Text.FileCM.SaveAsPatch" xml:space="preserve">另存為修補檔 (patch)...</x:String>
<x:String x:Key="Text.FileCM.Stage" xml:space="preserve">暫存 (add)</x:String>
<x:String x:Key="Text.FileCM.StageMulti" xml:space="preserve">暫存 (add) 已選的 {0} 個檔案</x:String>
@ -364,7 +360,6 @@
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快速鍵參考</x:String>
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全域快速鍵</x:String>
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消彈出面板</x:String>
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">複製 (clone) 遠端存放庫</x:String>
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">關閉目前頁面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切換到上一個頁面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切換到下一個頁面</x:String>
@ -396,14 +391,10 @@
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">捨棄</x:String>
<x:String x:Key="Text.Init" xml:space="preserve">初始化存放庫</x:String>
<x:String x:Key="Text.Init.Path" xml:space="preserve">路徑:</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">揀選 (cherry-pick) 操作進行中。</x:String>
<x:String x:Key="Text.InProgress.CherryPick.Head" xml:space="preserve">正在處理提交</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合併操作進行中。</x:String>
<x:String x:Key="Text.InProgress.Merge.Operating" xml:space="preserve">正在處理</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">重定基底 (rebase) 操作進行中。</x:String>
<x:String x:Key="Text.InProgress.Rebase.StoppedAt" xml:space="preserve">当前停止于</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">復原提交操作進行中。</x:String>
<x:String x:Key="Text.InProgress.Revert.Head" xml:space="preserve">正在復原提交</x:String>
<x:String x:Key="Text.InProgress.CherryPick" xml:space="preserve">揀選 (cherry-pick) 操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.Merge" xml:space="preserve">合併操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.Rebase" xml:space="preserve">重定基底 (rebase) 操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InProgress.Revert" xml:space="preserve">復原提交操作進行中。點選 [中止] 復原到操作前的狀態。</x:String>
<x:String x:Key="Text.InteractiveRebase" xml:space="preserve">互動式重定基底</x:String>
<x:String x:Key="Text.InteractiveRebase.Target" xml:space="preserve">目標分支:</x:String>
<x:String x:Key="Text.InteractiveRebase.On" xml:space="preserve">起始提交:</x:String>
@ -414,11 +405,7 @@
<x:String x:Key="Text.Merge" xml:space="preserve">合併分支</x:String>
<x:String x:Key="Text.Merge.Into" xml:space="preserve">目標分支:</x:String>
<x:String x:Key="Text.Merge.Mode" xml:space="preserve">合併方式:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合併目標:</x:String>
<x:String x:Key="Text.MergeMultiple" xml:space="preserve">合併(多目標)</x:String>
<x:String x:Key="Text.MergeMultiple.CommitChanges" xml:space="preserve">提交變更</x:String>
<x:String x:Key="Text.MergeMultiple.Strategy" xml:space="preserve">合併策略:</x:String>
<x:String x:Key="Text.MergeMultiple.Targets" xml:space="preserve">目標列表:</x:String>
<x:String x:Key="Text.Merge.Source" xml:space="preserve">合併分支:</x:String>
<x:String x:Key="Text.MoveRepositoryNode" xml:space="preserve">調整存放庫分組</x:String>
<x:String x:Key="Text.MoveRepositoryNode.Target" xml:space="preserve">請選擇目標分組:</x:String>
<x:String x:Key="Text.Name" xml:space="preserve">名稱:</x:String>
@ -577,6 +564,7 @@
<x:String x:Key="Text.Repository.Refresh" xml:space="preserve">重新載入</x:String>
<x:String x:Key="Text.Repository.Remotes" xml:space="preserve">遠端列表</x:String>
<x:String x:Key="Text.Repository.Remotes.Add" xml:space="preserve">新增遠端</x:String>
<x:String x:Key="Text.Repository.Resolve" xml:space="preserve">解決衝突</x:String>
<x:String x:Key="Text.Repository.Search" xml:space="preserve">搜尋提交</x:String>
<x:String x:Key="Text.Repository.Search.ByFile" xml:space="preserve">檔案</x:String>
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">提交訊息</x:String>
@ -584,7 +572,6 @@
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">作者及提交者</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">僅搜尋目前分支</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">以樹型結構展示</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">跳過此提交</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">提交統計</x:String>
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">子模組列表</x:String>
<x:String x:Key="Text.Repository.Submodules.Add" xml:space="preserve">新增子模組</x:String>

View file

@ -72,9 +72,10 @@ namespace SourceGit.ViewModels
return Task.Run(() =>
{
var succ = false;
if (IsMergeCommit)
{
new Commands.CherryPick(
succ = new Commands.CherryPick(
_repo.FullPath,
Targets[0].SHA,
!AutoCommit,
@ -83,7 +84,7 @@ namespace SourceGit.ViewModels
}
else
{
new Commands.CherryPick(
succ = new Commands.CherryPick(
_repo.FullPath,
string.Join(' ', Targets.ConvertAll(c => c.SHA)),
!AutoCommit,
@ -92,7 +93,7 @@ namespace SourceGit.ViewModels
}
CallUIThread(() => _repo.SetWatcherEnabled(true));
return true;
return succ;
});
}

View file

@ -1,78 +0,0 @@
namespace SourceGit.ViewModels
{
public class Conflict
{
public object Theirs
{
get;
private set;
}
public object Mine
{
get;
private set;
}
public bool IsResolved
{
get;
private set;
}
public Conflict(Repository repo, WorkingCopy wc, Models.Change change)
{
_wc = wc;
_change = change;
IsResolved = new Commands.IsConflictResolved(repo.FullPath, change).ReadToEnd().IsSuccess;
var context = wc.InProgressContext;
if (context is CherryPickInProgress cherryPick)
{
Theirs = cherryPick.Head;
Mine = repo.CurrentBranch;
}
else if (context is RebaseInProgress rebase)
{
Theirs = repo.Branches.Find(x => x.IsLocal && x.Name == rebase.HeadName) ??
new Models.Branch()
{
IsLocal = true,
Name = rebase.HeadName,
FullName = $"refs/heads/{rebase.HeadName}"
};
Mine = rebase.Onto;
}
else if (context is RevertInProgress revert)
{
Theirs = revert.Head;
Mine = repo.CurrentBranch;
}
else if (context is MergeInProgress merge)
{
Theirs = merge.Source;
Mine = repo.CurrentBranch;
}
}
public void UseTheirs()
{
_wc.UseTheirs([_change]);
}
public void UseMine()
{
_wc.UseMine([_change]);
}
public void OpenExternalMergeTool()
{
_wc.UseExternalMergeTool(_change);
}
private WorkingCopy _wc = null;
private Models.Change _change = null;
}
}

View file

@ -228,28 +228,22 @@ namespace SourceGit.ViewModels
{
var selected = new List<Models.Commit>();
var canCherryPick = true;
var canMerge = true;
foreach (var item in list.SelectedItems)
{
if (item is Models.Commit c)
{
selected.Add(c);
if (c.IsMerged)
{
canMerge = false;
if (c.IsMerged || c.Parents.Count > 1)
canCherryPick = false;
}
else if (c.Parents.Count > 1)
{
canCherryPick = false;
}
}
}
// Sort selected commits in order.
selected.Sort((l, r) => _commits.IndexOf(r) - _commits.IndexOf(l));
selected.Sort((l, r) =>
{
return _commits.IndexOf(r) - _commits.IndexOf(l);
});
var multipleMenu = new ContextMenu();
@ -265,24 +259,8 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
multipleMenu.Items.Add(cherryPickMultiple);
}
if (canMerge)
{
var mergeMultiple = new MenuItem();
mergeMultiple.Header = App.Text("CommitCM.MergeMultiple");
mergeMultiple.Icon = App.CreateMenuIcon("Icons.Merge");
mergeMultiple.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new MergeMultiple(_repo, selected));
e.Handled = true;
};
multipleMenu.Items.Add(mergeMultiple);
}
if (canCherryPick || canMerge)
multipleMenu.Items.Add(new MenuItem() { Header = "-" });
}
var saveToPatchMultiple = new MenuItem();
saveToPatchMultiple.Icon = App.CreateMenuIcon("Icons.Diff");
@ -407,26 +385,24 @@ namespace SourceGit.ViewModels
};
menu.Items.Add(reset);
if (commit.IsMerged)
var squash = new MenuItem();
squash.Header = App.Text("CommitCM.SquashCommitsSinceThis");
squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent");
squash.IsVisible = commit.IsMerged;
squash.Click += (_, e) =>
{
var squash = new MenuItem();
squash.Header = App.Text("CommitCM.SquashCommitsSinceThis");
squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent");
squash.Click += (_, e) =>
if (_repo.LocalChangesCount > 0)
{
if (_repo.LocalChangesCount > 0)
{
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
}
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
}
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Squash(_repo, commit, commit.SHA));
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Squash(_repo, commit, commit.SHA));
e.Handled = true;
};
menu.Items.Add(squash);
}
e.Handled = true;
};
menu.Items.Add(squash);
}
else
{
@ -484,21 +460,6 @@ namespace SourceGit.ViewModels
};
menu.Items.Add(rebase);
if (!commit.HasDecorators)
{
var merge = new MenuItem();
merge.Header = new Views.NameHighlightedTextBlock("CommitCM.Merge", current.Name);
merge.Icon = App.CreateMenuIcon("Icons.Merge");
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, commit, current.Name));
e.Handled = true;
};
menu.Items.Add(merge);
}
var cherryPick = new MenuItem();
cherryPick.Header = App.Text("CommitCM.CherryPick");
cherryPick.Icon = App.CreateMenuIcon("Icons.CherryPick");
@ -543,6 +504,27 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
menu.Items.Add(revert);
var interactiveRebase = new MenuItem();
interactiveRebase.Header = new Views.NameHighlightedTextBlock("CommitCM.InteractiveRebase", current.Name);
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
interactiveRebase.IsVisible = current.Head != commit.SHA;
interactiveRebase.Click += (_, e) =>
{
if (_repo.LocalChangesCount > 0)
{
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
}
App.OpenDialog(new Views.InteractiveRebase()
{
DataContext = new InteractiveRebase(_repo, current, commit)
});
e.Handled = true;
};
menu.Items.Add(interactiveRebase);
}
if (current.Head != commit.SHA)
@ -561,30 +543,6 @@ namespace SourceGit.ViewModels
menu.Items.Add(new MenuItem() { Header = "-" });
if (commit.IsMerged && current.Head != commit.SHA)
{
var interactiveRebase = new MenuItem();
interactiveRebase.Header = new Views.NameHighlightedTextBlock("CommitCM.InteractiveRebase", current.Name);
interactiveRebase.Icon = App.CreateMenuIcon("Icons.InteractiveRebase");
interactiveRebase.Click += (_, e) =>
{
if (_repo.LocalChangesCount > 0)
{
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
}
App.OpenDialog(new Views.InteractiveRebase()
{
DataContext = new InteractiveRebase(_repo, current, commit)
});
e.Handled = true;
};
menu.Items.Add(interactiveRebase);
menu.Items.Add(new MenuItem() { Header = "-" });
}
if (current.Head != commit.SHA)
{
var compareWithHead = new MenuItem();
@ -867,13 +825,8 @@ namespace SourceGit.ViewModels
fastForward.IsEnabled = current.TrackStatus.Ahead.Count == 0;
fastForward.Click += (_, e) =>
{
var b = _repo.Branches.Find(x => x.FriendlyName == upstream);
if (b == null)
return;
if (PopupHost.CanCreatePopup())
PopupHost.ShowAndStartPopup(new Merge(_repo, b, current.Name));
PopupHost.ShowAndStartPopup(new Merge(_repo, upstream, current.Name));
e.Handled = true;
};
submenu.Items.Add(fastForward);
@ -968,7 +921,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, branch, current.Name));
PopupHost.ShowPopup(new Merge(_repo, branch.Name, current.Name));
e.Handled = true;
};
submenu.Items.Add(merge);
@ -1052,7 +1005,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, branch, current.Name));
PopupHost.ShowPopup(new Merge(_repo, name, current.Name));
e.Handled = true;
};
@ -1111,7 +1064,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(_repo, tag, current.Name));
PopupHost.ShowPopup(new Merge(_repo, tag.Name, current.Name));
e.Handled = true;
};
submenu.Items.Add(merge);

View file

@ -4,29 +4,31 @@ namespace SourceGit.ViewModels
{
public abstract class InProgressContext
{
public string Repository
{
get;
set;
}
public string Cmd
{
get;
set;
}
public InProgressContext(string repo, string cmd)
{
_repo = repo;
_cmd = cmd;
Repository = repo;
Cmd = cmd;
}
public bool Abort()
{
return new Commands.Command()
{
WorkingDirectory = _repo,
Context = _repo,
Args = $"{_cmd} --abort",
}.Exec();
}
public virtual bool Skip()
{
return new Commands.Command()
{
WorkingDirectory = _repo,
Context = _repo,
Args = $"{_cmd} --skip",
WorkingDirectory = Repository,
Context = Repository,
Args = $"{Cmd} --abort",
}.Exec();
}
@ -34,96 +36,32 @@ namespace SourceGit.ViewModels
{
return new Commands.Command()
{
WorkingDirectory = _repo,
Context = _repo,
WorkingDirectory = Repository,
Context = Repository,
Editor = Commands.Command.EditorType.None,
Args = $"{_cmd} --continue",
Args = $"{Cmd} --continue",
}.Exec();
}
protected string GetFriendlyNameOfCommit(Models.Commit commit)
{
var branchDecorator = commit.Decorators.Find(x => x.Type == Models.DecoratorType.LocalBranchHead || x.Type == Models.DecoratorType.RemoteBranchHead);
if (branchDecorator != null)
return branchDecorator.Name;
var tagDecorator = commit.Decorators.Find(x => x.Type == Models.DecoratorType.Tag);
if (tagDecorator != null)
return tagDecorator.Name;
return commit.SHA.Substring(0, 10);
}
protected string _repo = string.Empty;
protected string _cmd = string.Empty;
}
public class CherryPickInProgress : InProgressContext
{
public Models.Commit Head
{
get;
private set;
}
public string HeadName
{
get => GetFriendlyNameOfCommit(Head);
}
public CherryPickInProgress(Repository repo) : base(repo.FullPath, "cherry-pick")
{
var headSHA = File.ReadAllText(Path.Combine(repo.GitDir, "CHERRY_PICK_HEAD")).Trim();
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result() ?? new Models.Commit() { SHA = headSHA };
}
public CherryPickInProgress(string repo) : base(repo, "cherry-pick") { }
}
public class RebaseInProgress : InProgressContext
{
public string HeadName
{
get;
private set;
}
public string BaseName
{
get => GetFriendlyNameOfCommit(Onto);
}
public Models.Commit StoppedAt
{
get;
private set;
}
public Models.Commit Onto
{
get;
private set;
}
public RebaseInProgress(Repository repo) : base(repo.FullPath, "rebase")
{
_gitDir = repo.GitDir;
var stoppedSHA = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "stopped-sha")).Trim();
StoppedAt = new Commands.QuerySingleCommit(repo.FullPath, stoppedSHA).Result() ?? new Models.Commit() { SHA = stoppedSHA };
var ontoSHA = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "onto")).Trim();
Onto = new Commands.QuerySingleCommit(repo.FullPath, ontoSHA).Result() ?? new Models.Commit() { SHA = ontoSHA };
HeadName = File.ReadAllText(Path.Combine(repo.GitDir, "rebase-merge", "head-name")).Trim();
if (HeadName.StartsWith("refs/heads/"))
HeadName = HeadName.Substring(11);
}
public override bool Continue()
{
var succ = new Commands.Command()
{
WorkingDirectory = _repo,
Context = _repo,
WorkingDirectory = Repository,
Context = Repository,
Editor = Commands.Command.EditorType.RebaseEditor,
Args = $"rebase --continue",
}.Exec();
@ -152,49 +90,11 @@ namespace SourceGit.ViewModels
public class RevertInProgress : InProgressContext
{
public Models.Commit Head
{
get;
private set;
}
public RevertInProgress(Repository repo) : base(repo.FullPath, "revert")
{
var headSHA = File.ReadAllText(Path.Combine(repo.GitDir, "REVERT_HEAD")).Trim();
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result() ?? new Models.Commit() { SHA = headSHA };
}
public RevertInProgress(string repo) : base(repo, "revert") { }
}
public class MergeInProgress : InProgressContext
{
public string Current
{
get;
private set;
}
public Models.Commit Source
{
get;
private set;
}
public string SourceName
{
get => GetFriendlyNameOfCommit(Source);
}
public MergeInProgress(Repository repo) : base(repo.FullPath, "merge")
{
Current = Commands.Branch.ShowCurrent(repo.FullPath);
var sourceSHA = File.ReadAllText(Path.Combine(repo.GitDir, "MERGE_HEAD")).Trim();
Source = new Commands.QuerySingleCommit(repo.FullPath, sourceSHA).Result() ?? new Models.Commit() { SHA = sourceSHA };
}
public override bool Skip()
{
return true;
}
public MergeInProgress(string repo) : base(repo, "merge") { }
}
}

View file

@ -5,7 +5,7 @@ namespace SourceGit.ViewModels
{
public class Merge : Popup
{
public object Source
public string Source
{
get;
}
@ -21,33 +21,9 @@ namespace SourceGit.ViewModels
set;
}
public Merge(Repository repo, Models.Branch source, string into)
public Merge(Repository repo, string source, string into)
{
_repo = repo;
_sourceName = source.FriendlyName;
Source = source;
Into = into;
SelectedMode = AutoSelectMergeMode();
View = new Views.Merge() { DataContext = this };
}
public Merge(Repository repo, Models.Commit source, string into)
{
_repo = repo;
_sourceName = source.SHA;
Source = source;
Into = into;
SelectedMode = AutoSelectMergeMode();
View = new Views.Merge() { DataContext = this };
}
public Merge(Repository repo, Models.Tag source, string into)
{
_repo = repo;
_sourceName = source.Name;
Source = source;
Into = into;
SelectedMode = AutoSelectMergeMode();
@ -57,11 +33,11 @@ namespace SourceGit.ViewModels
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = $"Merging '{_sourceName}' into '{Into}' ...";
ProgressDescription = $"Merging '{Source}' into '{Into}' ...";
return Task.Run(() =>
{
var succ = new Commands.Merge(_repo.FullPath, _sourceName, SelectedMode.Arg, SetProgressDescription).Exec();
var succ = new Commands.Merge(_repo.FullPath, Source, SelectedMode.Arg, SetProgressDescription).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
});
@ -83,6 +59,5 @@ namespace SourceGit.ViewModels
}
private readonly Repository _repo = null;
private readonly string _sourceName = string.Empty;
}
}

View file

@ -1,93 +0,0 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace SourceGit.ViewModels
{
public class MergeMultiple : Popup
{
public List<object> Targets
{
get;
private set;
} = [];
public bool AutoCommit
{
get;
set;
}
public Models.MergeStrategy Strategy
{
get;
set;
}
public MergeMultiple(Repository repo, List<Models.Commit> commits)
{
_repo = repo;
Targets.AddRange(commits);
AutoCommit = true;
Strategy = Models.MergeStrategy.ForMultiple[0];
View = new Views.MergeMultiple() { DataContext = this };
}
public MergeMultiple(Repository repo, List<Models.Branch> branches)
{
_repo = repo;
Targets.AddRange(branches);
AutoCommit = true;
Strategy = Models.MergeStrategy.ForMultiple[0];
View = new Views.MergeMultiple() { DataContext = this };
}
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = "Merge head(s) ...";
return Task.Run(() =>
{
var succ = new Commands.Merge(
_repo.FullPath,
ConvertTargetToMergeSources(),
AutoCommit,
Strategy.Arg,
SetProgressDescription).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return succ;
});
}
private List<string> ConvertTargetToMergeSources()
{
var ret = new List<string>();
foreach (var t in Targets)
{
if (t is Models.Branch branch)
{
ret.Add(branch.FriendlyName);
}
else if (t is Models.Commit commit)
{
var d = commit.Decorators.Find(x =>
{
return x.Type == Models.DecoratorType.LocalBranchHead ||
x.Type == Models.DecoratorType.RemoteBranchHead ||
x.Type == Models.DecoratorType.Tag;
});
if (d != null)
ret.Add(d.Name);
else
ret.Add(commit.SHA);
}
}
return ret;
}
private readonly Repository _repo = null;
}
}

View file

@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using Avalonia.Collections;
@ -66,8 +65,8 @@ namespace SourceGit.ViewModels
get => _defaultFontFamily;
set
{
var name = FixFontFamilyName(value);
if (SetProperty(ref _defaultFontFamily, name) && !_isLoading)
var trimmed = value.Trim();
if (SetProperty(ref _defaultFontFamily, trimmed) && !_isLoading)
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
}
}
@ -77,8 +76,8 @@ namespace SourceGit.ViewModels
get => _monospaceFontFamily;
set
{
var name = FixFontFamilyName(value);
if (SetProperty(ref _monospaceFontFamily, name) && !_isLoading)
var trimmed = value.Trim();
if (SetProperty(ref _monospaceFontFamily, trimmed) && !_isLoading)
App.SetFonts(_defaultFontFamily, _monospaceFontFamily, _onlyUseMonoFontInEditor);
}
}
@ -589,35 +588,6 @@ namespace SourceGit.ViewModels
return changed;
}
private string FixFontFamilyName(string name)
{
var trimmed = name.Trim();
if (string.IsNullOrEmpty(trimmed))
return string.Empty;
var builder = new StringBuilder();
var lastIsSpace = false;
for (int i = 0; i < trimmed.Length; i++)
{
var c = trimmed[i];
if (char.IsWhiteSpace(c))
{
if (lastIsSpace)
continue;
lastIsSpace = true;
}
else
{
lastIsSpace = false;
}
builder.Append(c);
}
return builder.ToString();
}
private static Preference _instance = null;
private static bool _isLoading = false;

View file

@ -764,9 +764,10 @@ namespace SourceGit.ViewModels
_workingCopy?.StashAll(autoStart);
}
public void SkipMerge()
public void GotoResolve()
{
_workingCopy?.SkipMerge();
if (_workingCopy != null)
SelectedViewIndex = 1;
}
public void AbortMerge()
@ -949,12 +950,6 @@ namespace SourceGit.ViewModels
PopupHost.ShowPopup(new DeleteMultipleBranches(this, branches, isLocal));
}
public void MergeMultipleBranches(List<Models.Branch> branches)
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new MergeMultiple(this, branches));
}
public void CreateNewTag()
{
if (_currentBranch == null)
@ -1310,13 +1305,8 @@ namespace SourceGit.ViewModels
fastForward.IsEnabled = branch.TrackStatus.Ahead.Count == 0;
fastForward.Click += (_, e) =>
{
var b = _branches.Find(x => x.FriendlyName == upstream);
if (b == null)
return;
if (PopupHost.CanCreatePopup())
PopupHost.ShowAndStartPopup(new Merge(this, b, branch.Name));
PopupHost.ShowAndStartPopup(new Merge(this, upstream, branch.Name));
e.Handled = true;
};
@ -1395,7 +1385,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(this, branch, _currentBranch.Name));
PopupHost.ShowPopup(new Merge(this, branch.Name, _currentBranch.Name));
e.Handled = true;
};
@ -1691,7 +1681,7 @@ namespace SourceGit.ViewModels
merge.Click += (_, e) =>
{
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new Merge(this, branch, _currentBranch.Name));
PopupHost.ShowPopup(new Merge(this, name, _currentBranch.Name));
e.Handled = true;
};

View file

@ -31,9 +31,9 @@ namespace SourceGit.ViewModels
return Task.Run(() =>
{
new Commands.Revert(_repo.FullPath, Target.SHA, AutoCommit).Exec();
var succ = new Commands.Revert(_repo.FullPath, Target.SHA, AutoCommit).Exec();
CallUIThread(() => _repo.SetWatcherEnabled(true));
return true;
return succ;
});
}

View file

@ -119,9 +119,9 @@ namespace SourceGit.ViewModels
{
var defaultCloneDir = Preference.Instance.GitDefaultCloneDir;
if (string.IsNullOrEmpty(defaultCloneDir))
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir hasn't been configured!");
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir haven't been configured!");
else if (!Directory.Exists(defaultCloneDir))
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' does not exist!");
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' is not exists!");
else if (PopupHost.CanCreatePopup())
PopupHost.ShowAndStartPopup(new ScanRepositories(defaultCloneDir));
}

View file

@ -11,6 +11,26 @@ using CommunityToolkit.Mvvm.ComponentModel;
namespace SourceGit.ViewModels
{
public class ConflictContext : ObservableObject
{
public bool IsResolved
{
get => _isResolved;
set => SetProperty(ref _isResolved, value);
}
public ConflictContext(string repo, Models.Change change)
{
Task.Run(() =>
{
var result = new Commands.IsConflictResolved(repo, change).ReadToEnd().IsSuccess;
Dispatcher.UIThread.Post(() => IsResolved = result);
});
}
private bool _isResolved = false;
}
public class WorkingCopy : ObservableObject
{
public bool IncludeUntracked
@ -29,7 +49,11 @@ namespace SourceGit.ViewModels
public bool CanCommitWithPush
{
get => _canCommitWithPush;
set => SetProperty(ref _canCommitWithPush, value);
set
{
if (SetProperty(ref _canCommitWithPush, value))
OnPropertyChanged(nameof(IsCommitWithPushVisible));
}
}
public bool HasUnsolvedConflicts
@ -85,10 +109,16 @@ namespace SourceGit.ViewModels
Staged = GetStagedChanges();
SelectedStaged = [];
OnPropertyChanged(nameof(IsCommitWithPushVisible));
}
}
}
public bool IsCommitWithPushVisible
{
get => !UseAmend && CanCommitWithPush;
}
public List<Models.Change> Unstaged
{
get => _unstaged;
@ -207,13 +237,13 @@ namespace SourceGit.ViewModels
var inProgress = null as InProgressContext;
if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
inProgress = new CherryPickInProgress(_repo);
inProgress = new CherryPickInProgress(_repo.FullPath);
else if (File.Exists(Path.Combine(_repo.GitDir, "REBASE_HEAD")) && Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")))
inProgress = new RebaseInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
inProgress = new RevertInProgress(_repo);
inProgress = new RevertInProgress(_repo.FullPath);
else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
inProgress = new MergeInProgress(_repo);
inProgress = new MergeInProgress(_repo.FullPath);
HasUnsolvedConflicts = _cached.Find(x => x.IsConflit) != null;
InProgressContext = inProgress;
@ -280,13 +310,13 @@ namespace SourceGit.ViewModels
var inProgress = null as InProgressContext;
if (File.Exists(Path.Combine(_repo.GitDir, "CHERRY_PICK_HEAD")))
inProgress = new CherryPickInProgress(_repo);
inProgress = new CherryPickInProgress(_repo.FullPath);
else if (File.Exists(Path.Combine(_repo.GitDir, "REBASE_HEAD")) && Directory.Exists(Path.Combine(_repo.GitDir, "rebase-merge")))
inProgress = new RebaseInProgress(_repo);
else if (File.Exists(Path.Combine(_repo.GitDir, "REVERT_HEAD")))
inProgress = new RevertInProgress(_repo);
inProgress = new RevertInProgress(_repo.FullPath);
else if (File.Exists(Path.Combine(_repo.GitDir, "MERGE_HEAD")))
inProgress = new MergeInProgress(_repo);
inProgress = new MergeInProgress(_repo.FullPath);
InProgressContext = inProgress;
@ -410,54 +440,6 @@ namespace SourceGit.ViewModels
}
}
public async void UseTheirs(List<Models.Change> changes)
{
var files = new List<string>();
foreach (var change in changes)
{
if (change.IsConflit)
files.Add(change.Path);
}
_repo.SetWatcherEnabled(false);
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseTheirs(files));
if (succ)
{
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
}
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
}
public async void UseMine(List<Models.Change> changes)
{
var files = new List<string>();
foreach (var change in changes)
{
if (change.IsConflit)
files.Add(change.Path);
}
_repo.SetWatcherEnabled(false);
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseMine(files));
if (succ)
{
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
}
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
}
public async void UseExternalMergeTool(Models.Change change)
{
var toolType = Preference.Instance.ExternalMergeToolType;
var toolPath = Preference.Instance.ExternalMergeToolPath;
_repo.SetWatcherEnabled(false);
await Task.Run(() => Commands.MergeTool.OpenForMerge(_repo.FullPath, toolType, toolPath, change.Path));
_repo.SetWatcherEnabled(true);
}
public void ContinueMerge()
{
if (_inProgressContext != null)
@ -481,29 +463,6 @@ namespace SourceGit.ViewModels
}
}
public void SkipMerge()
{
if (_inProgressContext != null)
{
_repo.SetWatcherEnabled(false);
Task.Run(() =>
{
var succ = _inProgressContext.Skip();
Dispatcher.UIThread.Invoke(() =>
{
if (succ)
CommitMessage = string.Empty;
_repo.SetWatcherEnabled(true);
});
});
}
else
{
_repo.MarkWorkingCopyDirtyManually();
}
}
public void AbortMerge()
{
if (_inProgressContext != null)
@ -610,30 +569,8 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
if (_inProgressContext is CherryPickInProgress cherryPick)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", cherryPick.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if(_inProgressContext is RebaseInProgress rebase)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.BaseName);
}
else if (_inProgressContext is RevertInProgress revert)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", revert.Head.SHA.Substring(0, 10) + " (revert)");
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if (_inProgressContext is MergeInProgress merge)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", merge.SourceName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
menu.Items.Add(useTheirs);
menu.Items.Add(useMine);
menu.Items.Add(new MenuItem() { Header = "-" });
menu.Items.Add(openMerger);
menu.Items.Add(new MenuItem() { Header = "-" });
}
@ -955,27 +892,6 @@ namespace SourceGit.ViewModels
e.Handled = true;
};
if (_inProgressContext is CherryPickInProgress cherryPick)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", cherryPick.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if (_inProgressContext is RebaseInProgress rebase)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.HeadName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", rebase.BaseName);
}
else if (_inProgressContext is RevertInProgress revert)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", revert.Head.SHA.Substring(0,10) + " (revert)");
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
else if (_inProgressContext is MergeInProgress merge)
{
useTheirs.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", merge.SourceName);
useMine.Header = new Views.NameHighlightedTextBlock("FileCM.ResolveUsing", _repo.CurrentBranch.Name);
}
menu.Items.Add(useTheirs);
menu.Items.Add(useMine);
return menu;
@ -1479,11 +1395,59 @@ namespace SourceGit.ViewModels
if (change == null)
DetailContext = null;
else if (change.IsConflit && isUnstaged)
DetailContext = new Conflict(_repo, this, change);
DetailContext = new ConflictContext(_repo.FullPath, change);
else
DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged), _detailContext as DiffContext);
}
private async void UseTheirs(List<Models.Change> changes)
{
var files = new List<string>();
foreach (var change in changes)
{
if (change.IsConflit)
files.Add(change.Path);
}
_repo.SetWatcherEnabled(false);
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseTheirs(files));
if (succ)
{
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
}
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
}
private async void UseMine(List<Models.Change> changes)
{
var files = new List<string>();
foreach (var change in changes)
{
if (change.IsConflit)
files.Add(change.Path);
}
_repo.SetWatcherEnabled(false);
var succ = await Task.Run(() => new Commands.Checkout(_repo.FullPath).UseMine(files));
if (succ)
{
await Task.Run(() => new Commands.Add(_repo.FullPath, changes).Exec());
}
_repo.MarkWorkingCopyDirtyManually();
_repo.SetWatcherEnabled(true);
}
private async void UseExternalMergeTool(Models.Change change)
{
var toolType = Preference.Instance.ExternalMergeToolType;
var toolPath = Preference.Instance.ExternalMergeToolPath;
_repo.SetWatcherEnabled(false);
await Task.Run(() => Commands.MergeTool.OpenForMerge(_repo.FullPath, toolType, toolPath, change.Path));
_repo.SetWatcherEnabled(true);
}
private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty)
{
if (!PopupHost.CanCreatePopup())

View file

@ -29,7 +29,7 @@
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -405,17 +405,6 @@ namespace SourceGit.Views
ev.Handled = true;
};
menu.Items.Add(deleteMulti);
var mergeMulti = new MenuItem();
mergeMulti.Header = App.Text("BranchCM.MergeMultiBranches", branches.Count);
mergeMulti.Icon = App.CreateMenuIcon("Icons.Merge");
mergeMulti.Click += (_, ev) =>
{
repo.MergeMultipleBranches(branches);
ev.Handled = true;
};
menu.Items.Add(mergeMulti);
menu?.Open(this);
}
}

View file

@ -18,7 +18,7 @@
Margin="0,0,8,0"
Text="{DynamicResource Text.Checkout.Commit.Target}" />
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}" />
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}" />
<TextBlock Grid.Column="1" Classes="primary" Foreground="DarkOrange" VerticalAlignment="Center" Margin="8,0" Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" />
<TextBlock Grid.Column="2" Text="{Binding Commit.Subject}" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -44,7 +44,7 @@
<ListBox.ItemTemplate>
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="14,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -112,8 +112,7 @@
Cursor="Hand"
Margin="0,0,16,0"
PointerEntered="OnSHAPointerEntered"
PointerPressed="OnSHAPressed"
ToolTip.ShowDelay="0">
PointerPressed="OnSHAPressed">
<TextBlock.DataTemplates>
<DataTemplate DataType="m:Commit">
<StackPanel MinWidth="400" Orientation="Vertical">
@ -150,8 +149,7 @@
Cursor="Hand"
Margin="0,0,16,0"
PointerEntered="OnSHAPointerEntered"
PointerPressed="OnSHAPressed"
ToolTip.ShowDelay="0">
PointerPressed="OnSHAPressed">
<TextBlock.DataTemplates>
<DataTemplate DataType="m:Commit">
<StackPanel MinWidth="400" Orientation="Vertical">

View file

@ -130,15 +130,19 @@ namespace SourceGit.Views
{
var tooltip = ToolTip.GetTip(ctl);
if (tooltip is Models.Commit commit && commit.SHA == sha)
return;
var c = await Task.Run(() => detail.GetParent(sha));
if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha)
{
ToolTip.SetTip(ctl, c);
ToolTip.SetIsOpen(ctl, true);
}
else
{
var c = await Task.Run(() => detail.GetParent(sha));
if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha)
{
ToolTip.SetTip(ctl, c);
if (ctl.IsPointerOver)
ToolTip.SetIsOpen(ctl, true);
if (ctl.IsPointerOver)
ToolTip.SetIsOpen(ctl, true);
}
}
}

View file

@ -95,7 +95,7 @@ namespace SourceGit.Views
if (change.Property == TextProperty && _changingWay == TextChangeWay.None)
{
_changingWay = TextChangeWay.FromSource;
var normalized = Text.ReplaceLineEndings("\n");
var normalized = Text.ReplaceLineEndings("\n").Trim();
var subjectEnd = normalized.IndexOf("\n\n", StringComparison.Ordinal);
if (subjectEnd == -1)
{

View file

@ -37,7 +37,7 @@
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -29,7 +29,7 @@
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -45,7 +45,7 @@
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Increase}}"
Margin="0,0,0,8"/>
<Grid RowDefinitions="20,20,20,20,20,20,20" ColumnDefinitions="150,*">
<Grid RowDefinitions="20,20,20,20,20,20" ColumnDefinitions="150,*">
<TextBlock Grid.Row="0" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+Shift+P, macOS=⌘+\,}"/>
<TextBlock Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.OpenPreference}"/>
@ -61,11 +61,8 @@
<TextBlock Grid.Row="4" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+Tab, macOS=⌘+⌥+→}"/>
<TextBlock Grid.Row="4" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.GotoNextTab}" />
<TextBlock Grid.Row="5" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+N, macOS=⌘+N}"/>
<TextBlock Grid.Row="5" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.Clone}" />
<TextBlock Grid.Row="6" Grid.Column="0" Classes="primary bold" Text="ESC"/>
<TextBlock Grid.Row="6" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CancelPopup}" />
<TextBlock Grid.Row="5" Grid.Column="0" Classes="primary bold" Text="ESC"/>
<TextBlock Grid.Row="5" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.CancelPopup}" />
</Grid>
<TextBlock Text="{DynamicResource Text.Hotkeys.Repo}"

View file

@ -44,7 +44,7 @@
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Current.FriendlyName}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="3" Margin="48,0,0,0" Text="{DynamicResource Text.InteractiveRebase.On}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
<Path Grid.Column="4" Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="4" Width="14" Height="14" Margin="8,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="5" Classes="primary" VerticalAlignment="Center" Text="{Binding On.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="6" VerticalAlignment="Center" Text="{Binding On.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -136,16 +136,6 @@ namespace SourceGit.Views
return;
}
if (e.Key == Key.N)
{
if (vm.ActivePage.Data is not ViewModels.Welcome)
vm.AddNewTab();
ViewModels.Welcome.Instance.Clone();
e.Handled = true;
return;
}
if ((OperatingSystem.IsMacOS() && e.KeyModifiers.HasFlag(KeyModifiers.Alt) && e.Key == Key.Right) ||
(!OperatingSystem.IsMacOS() && !e.KeyModifiers.HasFlag(KeyModifiers.Shift) && e.Key == Key.Tab))
{

View file

@ -77,7 +77,7 @@
HorizontalAlignment="Right"
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}">
<Button Classes="flat primary"
Width="100" Height="28"
Width="80" Height="28"
Padding="0"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
@ -85,7 +85,7 @@
Click="OnPopupSure"
HotKey="Enter"/>
<Button Classes="flat"
Width="100" Height="28"
Width="80" Height="28"
Margin="8,0,0,0"
Padding="0"
HorizontalContentAlignment="Center"
@ -112,24 +112,19 @@
<Border Margin="6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Effect="drop-shadow(0 0 8 #8F000000)">
<Border Padding="8" CornerRadius="6" Background="{DynamicResource Brush.Popup}">
<Grid RowDefinitions="26,Auto">
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Margin="8,0">
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="8,0">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red" IsVisible="{Binding IsError}"/>
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green" IsVisible="{Binding !IsError}"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}" IsVisible="{Binding IsError}"/>
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}" IsVisible="{Binding !IsError}"/>
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnCopyNotification">
<Path Width="12" Height="12" Data="{StaticResource Icons.Copy}"/>
</Button>
<Button Grid.Column="3" Classes="icon_button" Width="16" Height="16" Margin="8,0,0,0" Click="OnDismissNotification">
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnDismissNotification">
<Path Width="10" Height="10" Data="{StaticResource Icons.Window.Close}"/>
</Button>
</Grid>
<Border Grid.Row="1" Margin="8" Background="{DynamicResource Brush.Contents}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
<ScrollViewer MaxHeight="200" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<TextBlock Margin="4,2" TextWrapping="NoWrap" Text="{Binding Message}"/>
</ScrollViewer>
</Border>
<ScrollViewer Grid.Row="1" Margin="8" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<SelectableTextBlock TextWrapping="Wrap" Text="{Binding Message}"/>
</ScrollViewer>
</Grid>
</Border>
</Border>

View file

@ -32,14 +32,6 @@ namespace SourceGit.Views
OnPopupCancel(sender, e);
}
private void OnCopyNotification(object sender, RoutedEventArgs e)
{
if (sender is Button { DataContext: Models.Notification notice })
App.CopyText(notice.Message);
e.Handled = true;
}
private void OnDismissNotification(object sender, RoutedEventArgs e)
{
if (sender is Button { DataContext: Models.Notification notice } &&

View file

@ -4,7 +4,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:m="using:SourceGit.Models"
xmlns:vm="using:SourceGit.ViewModels"
xmlns:c="using:SourceGit.Converters"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.Merge"
x:DataType="vm:Merge">
@ -12,36 +11,15 @@
<TextBlock FontSize="18"
Classes="bold"
Text="{DynamicResource Text.Merge}"/>
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32" ColumnDefinitions="130,*">
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32" ColumnDefinitions="150,*">
<TextBlock Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
Text="{DynamicResource Text.Merge.Source}"/>
<ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding Source}">
<ContentControl.DataTemplates>
<DataTemplate DataType="m:Branch">
<StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icons.Branch}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>
</DataTemplate>
<DataTemplate DataType="m:Tag">
<StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icons.Tag}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" Margin="8,0,0,0"/>
</StackPanel>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Height="20" VerticalAlignment="Center">
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Branch}"/>
<TextBlock Text="{Binding Source}"/>
</StackPanel>
<TextBlock Grid.Row="1" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"

View file

@ -1,93 +0,0 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:m="using:SourceGit.Models"
xmlns:vm="using:SourceGit.ViewModels"
xmlns:c="using:SourceGit.Converters"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.MergeMultiple"
x:DataType="vm:MergeMultiple">
<StackPanel Orientation="Vertical" Margin="8,0">
<TextBlock FontSize="18"
Classes="bold"
Text="{DynamicResource Text.MergeMultiple}"/>
<Grid Margin="0,16,0,0" RowDefinitions="Auto,32,32" ColumnDefinitions="100,*">
<TextBlock Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,6,8,0"
Text="{DynamicResource Text.MergeMultiple.Targets}"/>
<ListBox Grid.Row="0" Grid.Column="1"
MinHeight="32" MaxHeight="100" Margin="0,0,0,4"
ItemsSource="{Binding Targets}"
Background="{DynamicResource Brush.Contents}"
BorderThickness="1"
BorderBrush="{DynamicResource Brush.Border2}"
Padding="4"
CornerRadius="4"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Padding" Value="4,0"/>
<Setter Property="Height" Value="26"/>
<Setter Property="CornerRadius" Value="4"/>
</Style>
</ListBox.Styles>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<ContentControl Content="{Binding}">
<ContentControl.DataTemplates>
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="14,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
</Grid>
</DataTemplate>
<DataTemplate DataType="m:Branch">
<StackPanel Orientation="Horizontal">
<Path Width="14" Height="14" Data="{StaticResource Icons.Branch}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0"/>
</StackPanel>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Grid.Row="1" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
Text="{DynamicResource Text.MergeMultiple.Strategy}"/>
<ComboBox Grid.Row="1" Grid.Column="1"
Height="28" Padding="8,0"
VerticalAlignment="Center" HorizontalAlignment="Stretch"
ItemsSource="{Binding Source={x:Static m:MergeStrategy.ForMultiple}}"
SelectedItem="{Binding Strategy, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="m:MergeStrategy">
<StackPanel Orientation="Horizontal" Height="20" VerticalAlignment="Center">
<TextBlock Text="{Binding Name}"/>
<TextBlock Text="{Binding Desc}" Margin="8,0,0,0" FontSize="11" Foreground="{DynamicResource Brush.FG2}"/>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<CheckBox Grid.Row="2" Grid.Column="1"
Content="{DynamicResource Text.MergeMultiple.CommitChanges}"
IsChecked="{Binding AutoCommit, Mode=TwoWay}"/>
</Grid>
</StackPanel>
</UserControl>

View file

@ -1,12 +0,0 @@
using Avalonia.Controls;
namespace SourceGit.Views
{
public partial class MergeMultiple : UserControl
{
public MergeMultiple()
{
InitializeComponent();
}
}
}

View file

@ -37,7 +37,7 @@
<DataTemplate DataType="m:Commit">
<Grid ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -547,75 +547,44 @@
<!-- Right -->
<Grid Grid.Column="2" RowDefinitions="Auto,Auto,*">
<Grid Grid.Row="0" Height="28" ColumnDefinitions="*,Auto" Background="{DynamicResource Brush.Conflict}" IsVisible="{Binding InProgressContext, Converter={x:Static ObjectConverters.IsNotNull}}">
<Grid Grid.Row="0" Height="28" ColumnDefinitions="*,Auto,Auto" Background="{DynamicResource Brush.Conflict}" IsVisible="{Binding InProgressContext, Converter={x:Static ObjectConverters.IsNotNull}}">
<ContentControl Grid.Column="0" Margin="8,0" Content="{Binding InProgressContext}">
<ContentControl.DataTemplates>
<DataTemplate DataType="m:Commit">
<StackPanel MinWidth="400" Orientation="Vertical">
<Grid ColumnDefinitions="Auto,*,Auto">
<v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/>
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
</Grid>
<TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="vm:CherryPickInProgress">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick.Head}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding Head}"/>
</StackPanel>
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
</Grid>
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick}"/>
</DataTemplate>
<DataTemplate DataType="vm:RebaseInProgress">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase.StoppedAt}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding StoppedAt.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding StoppedAt}"/>
</StackPanel>
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
</Grid>
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
</DataTemplate>
<DataTemplate DataType="vm:RevertInProgress">
<Grid ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0" Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert.Head}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" ToolTip.Tip="{Binding Head}"/>
</StackPanel>
<Button Grid.Column="1" Classes="flat" FontWeight="Regular" BorderThickness="0" Content="{DynamicResource Text.Repository.Skip}" Padding="8,2" Click="OnSkipInProgress"/>
</Grid>
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert}"/>
</DataTemplate>
<DataTemplate DataType="vm:MergeInProgress">
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge.Operating}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding SourceName}" ToolTip.Tip="{Binding Source}"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.ConflictForeground}" Text="→"/>
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Foreground="DarkOrange" Text="{Binding Current}"/>
</StackPanel>
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge}"/>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
<Button Grid.Column="1"
Classes="flat"
FontWeight="Regular"
BorderThickness="0"
Content="{DynamicResource Text.Repository.Resolve}"
Padding="8,0" Margin="4,0"
Command="{Binding GotoResolve}">
<Button.IsVisible>
<Binding Path="SelectedViewIndex" Converter="{x:Static c:IntConverters.IsNotOne}"/>
</Button.IsVisible>
</Button>
<Button Grid.Column="2"
Classes="flat"
FontWeight="Regular"
BorderThickness="0"
Content="{DynamicResource Text.Repository.Abort}"
Padding="8,2" Margin="0,0,8,0"
Padding="8,0" Margin="4,0"
Command="{Binding AbortMerge}"/>
</Grid>

View file

@ -428,13 +428,5 @@ namespace SourceGit.Views
e.Handled = true;
}
private void OnSkipInProgress(object sender, RoutedEventArgs e)
{
if (DataContext is ViewModels.Repository repo)
repo.SkipMerge();
e.Handled = true;
}
}
}

View file

@ -270,10 +270,7 @@
<ListBox.ItemTemplate>
<DataTemplate DataType="m:IssueTrackerRule">
<Grid ColumnDefinitions="Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Issue}"/>
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
</Grid>
<TextBlock Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@ -314,7 +311,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{DynamicResource Brush.FG2}"
Data="{StaticResource Icons.Empty}"/>
Data="{StaticResource Icons.Issue}"/>
</Binding.TargetNullValue>
</Binding>
</ContentControl.Content>

View file

@ -27,7 +27,7 @@
Margin="0,0,8,0"
Text="{DynamicResource Text.Reset.MoveTo}"/>
<Grid Grid.Row="1" Grid.Column="1" ColumnDefinitions="Auto,Auto,*" Height="20" VerticalAlignment="Center">
<Path Grid.Column="0" Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding To.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
<TextBlock Grid.Column="2" Text="{Binding To.Subject}" Margin="8,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -18,7 +18,7 @@
Text="{DynamicResource Text.Revert.Commit}"/>
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Target.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
</Grid>

View file

@ -14,7 +14,7 @@
Text="{DynamicResource Text.Reword}"/>
<StackPanel Margin="8,16,8,0" Orientation="Horizontal" HorizontalAlignment="Right">
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
<Path Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
<TextBlock Classes="primary" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
</StackPanel>

View file

@ -17,7 +17,7 @@
<TextBlock Grid.Column="0"
Text="{DynamicResource Text.Squash.Into}"/>
<Path Grid.Column="1"
Margin="8,0"
Margin="8,6,8,0"
Width="14" Height="14"
Fill="{DynamicResource Brush.FG1}"
Data="{StaticResource Icons.Commit}"/>

View file

@ -26,7 +26,7 @@
SelectionChanged="OnRowSelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate DataType="vm:TagTreeNode">
<Grid ColumnDefinitions="16,Auto,*,20"
<Grid ColumnDefinitions="16,Auto,*,Auto"
Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
Background="Transparent"
ContextRequested="OnRowContextRequested"

View file

@ -719,22 +719,19 @@ namespace SourceGit.Views
else if (change.Property == BlockNavigationProperty)
{
var oldValue = change.OldValue as ViewModels.BlockNavigation;
if (oldValue != null)
{
oldValue.PropertyChanged -= OnBlockNavigationPropertyChanged;
if (oldValue.Current != -1)
TextArea?.TextView?.Redraw();
}
var newValue = change.NewValue as ViewModels.BlockNavigation;
if (oldValue != null)
oldValue.PropertyChanged -= OnBlockNavigationPropertyChanged;
if (newValue != null)
newValue.PropertyChanged += OnBlockNavigationPropertyChanged;
InvalidateVisual();
}
}
private void OnBlockNavigationPropertyChanged(object _1, PropertyChangedEventArgs _2)
{
TextArea?.TextView?.Redraw();
TextArea.TextView.Redraw();
}
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
@ -1579,7 +1576,7 @@ namespace SourceGit.Views
UseBlockNavigationProperty.Changed.AddClassHandler<TextDiffView>((v, _) =>
{
v.RefreshBlockNavigation();
v.RefreshContent(v.DataContext as Models.TextDiff, false);
});
SelectedChunkProperty.Changed.AddClassHandler<TextDiffView>((v, _) =>
@ -1667,14 +1664,6 @@ namespace SourceGit.Views
Editor.Content = diff;
}
RefreshBlockNavigation();
IsUnstagedChange = diff.Option.IsUnstaged;
EnableChunkSelection = diff.Option.WorkingCopyChange != null;
}
private void RefreshBlockNavigation()
{
if (UseBlockNavigation)
{
BlockNavigation = new ViewModels.BlockNavigation(Editor.Content);
@ -1685,6 +1674,9 @@ namespace SourceGit.Views
BlockNavigation = null;
BlockNavigationIndicator = "-/-";
}
IsUnstagedChange = diff.Option.IsUnstaged;
EnableChunkSelection = diff.Option.WorkingCopyChange != null;
}
private void OnStageChunk(object _1, RoutedEventArgs _2)

View file

@ -2,7 +2,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:m="using:SourceGit.Models"
xmlns:vm="using:SourceGit.ViewModels"
xmlns:v="using:SourceGit.Views"
xmlns:c="using:SourceGit.Converters"
@ -170,67 +169,13 @@
<ContentControl Content="{Binding DetailContext}">
<ContentControl.DataTemplates>
<DataTemplate DataType="vm:Conflict">
<DataTemplate DataType="vm:ConflictContext">
<Border Background="{DynamicResource Brush.Window}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
<Grid VerticalAlignment="Center">
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Orientation="Vertical" IsVisible="{Binding !IsResolved}">
<StackPanel.DataTemplates>
<DataTemplate DataType="m:Branch">
<StackPanel Orientation="Horizontal">
<Path Width="12" Height="12" Data="{StaticResource Icons.Branch}"/>
<TextBlock Margin="4,0,0,0" Text="{Binding FriendlyName}"/>
<TextBlock Margin="4,0,0,0" Text="{Binding Head, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="m:Commit">
<StackPanel Orientation="Horizontal">
<Path Width="12" Height="12" Data="{StaticResource Icons.Commit}"/>
<v:CommitRefsPresenter Margin="8,0,0,0"
TagBackground="{DynamicResource Brush.DecoratorTag}"
Foreground="{DynamicResource Brush.FG1}"
FontFamily="{DynamicResource Fonts.Primary}"
FontSize="11"
VerticalAlignment="Center"
UseGraphColor="False"/>
<TextBlock Margin="4,0,0,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
<TextBlock Margin="4,0,0,0" Text="{Binding Subject}"/>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="m:Tag">
<StackPanel Orientation="Horizontal">
<Path Width="12" Height="12" Data="{StaticResource Icons.Tag}"/>
<TextBlock Margin="4,0,0,0" Text="{Binding Name}"/>
<TextBlock Margin="4,0,0,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
</StackPanel>
</DataTemplate>
</StackPanel.DataTemplates>
<Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
<TextBlock Margin="0,16" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
<Border Margin="16,0" Padding="8" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
<Border.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="Theirs" Converter="{x:Static ObjectConverters.IsNotNull}"/>
<Binding Path="Mine" Converter="{x:Static ObjectConverters.IsNotNull}"/>
</MultiBinding>
</Border.IsVisible>
<Grid Margin="8,0,0,0" RowDefinitions="32,32" ColumnDefinitions="Auto,*">
<TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="THEIRS"/>
<ContentControl Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Content="{Binding Theirs}"/>
<TextBlock Grid.Row="1" Grid.Column="0" Classes="info_label" Text="MINE"/>
<ContentControl Grid.Row="1" Grid.Column="1" Margin="16,0,0,0" Content="{Binding Mine}"/>
</Grid>
</Border>
<StackPanel Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Classes="flat" Content="USE THEIRS" Command="{Binding UseTheirs}"/>
<Button Classes="flat" Margin="8,0,0,0" Content="USE MINE" Command="{Binding UseMine}"/>
<Button Classes="flat" Margin="8,0,0,0" Content="OPEN EXTERNAL MERGETOOL" Command="{Binding OpenExternalMergeTool}"/>
</StackPanel>
<Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}"/>
<TextBlock Margin="0,16,0,8" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
<TextBlock Text="{DynamicResource Text.WorkingCopy.ResolveTip}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Orientation="Vertical" IsVisible="{Binding IsResolved}">
@ -355,15 +300,8 @@
HotKey="Alt+Enter"
ToolTip.Tip="{OnPlatform Alt+Enter, macOS=⌥+Enter}"
ToolTip.Placement="Top"
ToolTip.VerticalOffset="0">
<Button.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<Binding Path="UseAmend" Converter="{x:Static BoolConverters.Not}"/>
<Binding Path="CanCommitWithPush"/>
<Binding Path="InProgressContext" Converter="{x:Static ObjectConverters.IsNull}"/>
</MultiBinding>
</Button.IsVisible>
</Button>
ToolTip.VerticalOffset="0"
IsVisible="{Binding IsCommitWithPushVisible}"/>
</Grid>
</Grid>
</Grid>