mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
Compare commits
8 commits
8ddf6e87e9
...
14334b08d2
Author | SHA1 | Date | |
---|---|---|---|
|
14334b08d2 | ||
|
c8a13bc4e9 | ||
|
bfb97dff72 | ||
|
4d14302929 | ||
|
249706c1ef | ||
|
857ba85d9f | ||
|
fb62732a92 | ||
|
eab36f08b3 |
14 changed files with 63 additions and 43 deletions
|
@ -7,17 +7,23 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
public Config(string repository)
|
public Config(string repository)
|
||||||
{
|
{
|
||||||
WorkingDirectory = repository;
|
if (string.IsNullOrEmpty(repository))
|
||||||
Context = repository;
|
{
|
||||||
|
WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WorkingDirectory = repository;
|
||||||
|
Context = repository;
|
||||||
|
_isLocal = true;
|
||||||
|
}
|
||||||
|
|
||||||
RaiseError = false;
|
RaiseError = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, string> ListAll()
|
public Dictionary<string, string> ListAll()
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(WorkingDirectory))
|
Args = "config -l";
|
||||||
Args = "config --global -l";
|
|
||||||
else
|
|
||||||
Args = "config -l";
|
|
||||||
|
|
||||||
var output = ReadToEnd();
|
var output = ReadToEnd();
|
||||||
var rs = new Dictionary<string, string>();
|
var rs = new Dictionary<string, string>();
|
||||||
|
@ -47,22 +53,16 @@ namespace SourceGit.Commands
|
||||||
|
|
||||||
public bool Set(string key, string value, bool allowEmpty = false)
|
public bool Set(string key, string value, bool allowEmpty = false)
|
||||||
{
|
{
|
||||||
|
var scope = _isLocal ? "--local" : "--global";
|
||||||
|
|
||||||
if (!allowEmpty && string.IsNullOrWhiteSpace(value))
|
if (!allowEmpty && string.IsNullOrWhiteSpace(value))
|
||||||
{
|
Args = $"config {scope} --unset {key}";
|
||||||
if (string.IsNullOrEmpty(WorkingDirectory))
|
|
||||||
Args = $"config --global --unset {key}";
|
|
||||||
else
|
|
||||||
Args = $"config --unset {key}";
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
Args = $"config {scope} {key} \"{value}\"";
|
||||||
if (string.IsNullOrWhiteSpace(WorkingDirectory))
|
|
||||||
Args = $"config --global {key} \"{value}\"";
|
|
||||||
else
|
|
||||||
Args = $"config {key} \"{value}\"";
|
|
||||||
}
|
|
||||||
|
|
||||||
return Exec();
|
return Exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool _isLocal = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace SourceGit.Commands
|
||||||
|
|
||||||
public static bool Add(string repo, string name, string basedOn, string message, bool sign)
|
public static bool Add(string repo, string name, string basedOn, string message, bool sign)
|
||||||
{
|
{
|
||||||
var param = sign ? "-s -a" : "-a";
|
var param = sign ? "--sign -a" : "--no-sign -a";
|
||||||
var cmd = new Command();
|
var cmd = new Command();
|
||||||
cmd.WorkingDirectory = repo;
|
cmd.WorkingDirectory = repo;
|
||||||
cmd.Context = repo;
|
cmd.Context = repo;
|
||||||
|
|
|
@ -141,6 +141,7 @@
|
||||||
<x:String x:Key="Text.Configure.Git" xml:space="preserve">GIT</x:String>
|
<x:String x:Key="Text.Configure.Git" xml:space="preserve">GIT</x:String>
|
||||||
<x:String x:Key="Text.Configure.Git.AutoFetch" xml:space="preserve">Remotes automatisch fetchen</x:String>
|
<x:String x:Key="Text.Configure.Git.AutoFetch" xml:space="preserve">Remotes automatisch fetchen</x:String>
|
||||||
<x:String x:Key="Text.Configure.Git.AutoFetchIntervalSuffix" xml:space="preserve">Minute(n)</x:String>
|
<x:String x:Key="Text.Configure.Git.AutoFetchIntervalSuffix" xml:space="preserve">Minute(n)</x:String>
|
||||||
|
<x:String x:Key="Text.Configure.Git.DefaultRemote" xml:space="preserve">Standard Remote</x:String>
|
||||||
<x:String x:Key="Text.Configure.IssueTracker" xml:space="preserve">TICKETSYSTEM</x:String>
|
<x:String x:Key="Text.Configure.IssueTracker" xml:space="preserve">TICKETSYSTEM</x:String>
|
||||||
<x:String x:Key="Text.Configure.IssueTracker.AddSampleGithub" xml:space="preserve">Beispiel für Github-Regel hinzufügen</x:String>
|
<x:String x:Key="Text.Configure.IssueTracker.AddSampleGithub" xml:space="preserve">Beispiel für Github-Regel hinzufügen</x:String>
|
||||||
<x:String x:Key="Text.Configure.IssueTracker.AddSampleJira" xml:space="preserve">Beispiel für Jira-Regel hinzufügen</x:String>
|
<x:String x:Key="Text.Configure.IssueTracker.AddSampleJira" xml:space="preserve">Beispiel für Jira-Regel hinzufügen</x:String>
|
||||||
|
@ -206,6 +207,7 @@
|
||||||
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">ALT</x:String>
|
<x:String x:Key="Text.Diff.Binary.Old" xml:space="preserve">ALT</x:String>
|
||||||
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">Kopieren</x:String>
|
<x:String x:Key="Text.Diff.Copy" xml:space="preserve">Kopieren</x:String>
|
||||||
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">Dateimodus geändert</x:String>
|
<x:String x:Key="Text.Diff.FileModeChanged" xml:space="preserve">Dateimodus geändert</x:String>
|
||||||
|
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">Ignoriere Leerzeichenänderungen</x:String>
|
||||||
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJEKT ÄNDERUNG</x:String>
|
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJEKT ÄNDERUNG</x:String>
|
||||||
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Nächste Änderung</x:String>
|
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Nächste Änderung</x:String>
|
||||||
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">KEINE ÄNDERUNG ODER NUR ZEILEN-ENDE ÄNDERUNGEN</x:String>
|
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">KEINE ÄNDERUNG ODER NUR ZEILEN-ENDE ÄNDERUNGEN</x:String>
|
||||||
|
@ -225,6 +227,7 @@
|
||||||
<x:String x:Key="Text.Discard" xml:space="preserve">Änderungen verwerfen</x:String>
|
<x:String x:Key="Text.Discard" xml:space="preserve">Änderungen verwerfen</x:String>
|
||||||
<x:String x:Key="Text.Discard.All" xml:space="preserve">Alle Änderungen in der Arbeitskopie.</x:String>
|
<x:String x:Key="Text.Discard.All" xml:space="preserve">Alle Änderungen in der Arbeitskopie.</x:String>
|
||||||
<x:String x:Key="Text.Discard.Changes" xml:space="preserve">Änderungen:</x:String>
|
<x:String x:Key="Text.Discard.Changes" xml:space="preserve">Änderungen:</x:String>
|
||||||
|
<x:String x:Key="Text.Discard.IncludeIgnored" xml:space="preserve">Ignorierte Dateien inkludieren</x:String>
|
||||||
<x:String x:Key="Text.Discard.Total" xml:space="preserve">Insgesamt {0} Änderungen werden verworfen</x:String>
|
<x:String x:Key="Text.Discard.Total" xml:space="preserve">Insgesamt {0} Änderungen werden verworfen</x:String>
|
||||||
<x:String x:Key="Text.Discard.Warning" xml:space="preserve">Du kannst das nicht rückgängig machen!!!</x:String>
|
<x:String x:Key="Text.Discard.Warning" xml:space="preserve">Du kannst das nicht rückgängig machen!!!</x:String>
|
||||||
<x:String x:Key="Text.EditRepositoryNode.Bookmark" xml:space="preserve">Lesezeichen:</x:String>
|
<x:String x:Key="Text.EditRepositoryNode.Bookmark" xml:space="preserve">Lesezeichen:</x:String>
|
||||||
|
@ -330,6 +333,7 @@
|
||||||
<x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String>
|
<x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String>
|
||||||
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Gestagte Änderungen committen</x:String>
|
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Gestagte Änderungen committen</x:String>
|
||||||
<x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Gestagte Änderungen committen und pushen</x:String>
|
<x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Gestagte Änderungen committen und pushen</x:String>
|
||||||
|
<x:String x:Key="Text.Hotkeys.Repo.CommitWithAutoStage" xml:space="preserve">Alle Änderungen stagen und committen</x:String>
|
||||||
<x:String x:Key="Text.Hotkeys.Repo.DiscardSelected" xml:space="preserve">Ausgewählte Änderungen verwerfen</x:String>
|
<x:String x:Key="Text.Hotkeys.Repo.DiscardSelected" xml:space="preserve">Ausgewählte Änderungen verwerfen</x:String>
|
||||||
<x:String x:Key="Text.Hotkeys.Repo.GoHome" xml:space="preserve">Dashboard Modus (Standard)</x:String>
|
<x:String x:Key="Text.Hotkeys.Repo.GoHome" xml:space="preserve">Dashboard Modus (Standard)</x:String>
|
||||||
<x:String x:Key="Text.Hotkeys.Repo.Refresh" xml:space="preserve">Erzwinge Neuladen des Repositorys</x:String>
|
<x:String x:Key="Text.Hotkeys.Repo.Refresh" xml:space="preserve">Erzwinge Neuladen des Repositorys</x:String>
|
||||||
|
@ -499,7 +503,7 @@
|
||||||
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Repository Einstellungen</x:String>
|
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Repository Einstellungen</x:String>
|
||||||
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">WEITER</x:String>
|
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">WEITER</x:String>
|
||||||
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Öffne im Datei-Browser</x:String>
|
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Öffne im Datei-Browser</x:String>
|
||||||
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Suche Branches & Tags & Submodule</x:String>
|
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Suche Branches/Tags/Submodule</x:String>
|
||||||
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">GEFILTERT:</x:String>
|
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">GEFILTERT:</x:String>
|
||||||
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOKALE BRANCHES</x:String>
|
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOKALE BRANCHES</x:String>
|
||||||
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Zum HEAD wechseln</x:String>
|
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Zum HEAD wechseln</x:String>
|
||||||
|
@ -516,6 +520,7 @@
|
||||||
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String>
|
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Commit-Nachricht</x:String>
|
||||||
<x:String x:Key="Text.Repository.Search.BySHA" xml:space="preserve">SHA</x:String>
|
<x:String x:Key="Text.Repository.Search.BySHA" xml:space="preserve">SHA</x:String>
|
||||||
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Autor & Committer</x:String>
|
<x:String x:Key="Text.Repository.Search.ByUser" xml:space="preserve">Autor & Committer</x:String>
|
||||||
|
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">Aktueller Branch</x:String>
|
||||||
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Zeige Tags als Baum</x:String>
|
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Zeige Tags als Baum</x:String>
|
||||||
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistiken</x:String>
|
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Statistiken</x:String>
|
||||||
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULE</x:String>
|
<x:String x:Key="Text.Repository.Submodules" xml:space="preserve">SUBMODULE</x:String>
|
||||||
|
@ -623,6 +628,8 @@
|
||||||
<x:String x:Key="Text.WorkingCopy.Commit" xml:space="preserve">COMMIT</x:String>
|
<x:String x:Key="Text.WorkingCopy.Commit" xml:space="preserve">COMMIT</x:String>
|
||||||
<x:String x:Key="Text.WorkingCopy.CommitAndPush" xml:space="preserve">COMMIT & PUSH</x:String>
|
<x:String x:Key="Text.WorkingCopy.CommitAndPush" xml:space="preserve">COMMIT & PUSH</x:String>
|
||||||
<x:String x:Key="Text.WorkingCopy.CommitMessageHelper" xml:space="preserve">Template/Historie</x:String>
|
<x:String x:Key="Text.WorkingCopy.CommitMessageHelper" xml:space="preserve">Template/Historie</x:String>
|
||||||
|
<x:String x:Key="Text.WorkingCopy.CommitTip" xml:space="preserve">Klick-Ereignis auslösen</x:String>
|
||||||
|
<x:String x:Key="Text.WorkingCopy.CommitWithAutoStage" xml:space="preserve">Alle Änderungen stagen und committen</x:String>
|
||||||
<x:String x:Key="Text.WorkingCopy.Conflicts" xml:space="preserve">KONFLIKTE ERKANNT</x:String>
|
<x:String x:Key="Text.WorkingCopy.Conflicts" xml:space="preserve">KONFLIKTE ERKANNT</x:String>
|
||||||
<x:String x:Key="Text.WorkingCopy.Conflicts.Resolved" xml:space="preserve">DATEI KONFLIKTE GELÖST</x:String>
|
<x:String x:Key="Text.WorkingCopy.Conflicts.Resolved" xml:space="preserve">DATEI KONFLIKTE GELÖST</x:String>
|
||||||
<x:String x:Key="Text.WorkingCopy.IncludeUntracked" xml:space="preserve">NICHT-VERFOLGTE DATEIEN INKLUDIEREN</x:String>
|
<x:String x:Key="Text.WorkingCopy.IncludeUntracked" xml:space="preserve">NICHT-VERFOLGTE DATEIEN INKLUDIEREN</x:String>
|
||||||
|
|
|
@ -500,7 +500,7 @@
|
||||||
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
|
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
|
||||||
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
|
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
|
||||||
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open In File Browser</x:String>
|
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Open In File Browser</x:String>
|
||||||
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches & Tags & Submodules</x:String>
|
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String>
|
||||||
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
|
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
|
||||||
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
|
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
|
||||||
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>
|
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceInclude Source="avares://SourceGit/Resources/Locales/en_US.axaml"/>
|
<ResourceInclude Source="avares://SourceGit/Resources/Locales/en_US.axaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
<x:String x:Key="Text.About" xml:space="preserve">À propos</x:String>
|
<x:String x:Key="Text.About" xml:space="preserve">À propos</x:String>
|
||||||
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Compilé avec </x:String>
|
<x:String x:Key="Text.About.BuildWith" xml:space="preserve">• Compilé avec </x:String>
|
||||||
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
|
<x:String x:Key="Text.About.Copyright" xml:space="preserve">© 2024 sourcegit-scm</x:String>
|
||||||
|
@ -479,7 +478,7 @@
|
||||||
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
|
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configure this repository</x:String>
|
||||||
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
|
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUE</x:String>
|
||||||
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Ouvrir dans l'explorateur Windows</x:String>
|
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Ouvrir dans l'explorateur Windows</x:String>
|
||||||
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches & Tags & Submodules</x:String>
|
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Search Branches/Tags/Submodules</x:String>
|
||||||
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
|
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTERED BY:</x:String>
|
||||||
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
|
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">LOCAL BRANCHES</x:String>
|
||||||
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>
|
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navigate To HEAD</x:String>
|
||||||
|
|
|
@ -471,7 +471,7 @@
|
||||||
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configurar este repositório</x:String>
|
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">Configurar este repositório</x:String>
|
||||||
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUAR</x:String>
|
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">CONTINUAR</x:String>
|
||||||
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Abrir no Navegador de Arquivos</x:String>
|
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">Abrir no Navegador de Arquivos</x:String>
|
||||||
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Pesquisar Branches & Tags & Submódulos</x:String>
|
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">Pesquisar Branches/Tags/Submódulos</x:String>
|
||||||
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTRADO POR:</x:String>
|
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">FILTRADO POR:</x:String>
|
||||||
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">BRANCHES LOCAIS</x:String>
|
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">BRANCHES LOCAIS</x:String>
|
||||||
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navegar para HEAD</x:String>
|
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">Navegar para HEAD</x:String>
|
||||||
|
|
|
@ -498,7 +498,7 @@
|
||||||
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">配置本仓库</x:String>
|
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">配置本仓库</x:String>
|
||||||
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
|
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
|
||||||
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在文件浏览器中打开</x:String>
|
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在文件浏览器中打开</x:String>
|
||||||
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速查找分支、标签、子模块</x:String>
|
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速查找分支/标签/子模块</x:String>
|
||||||
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">过滤规则 :</x:String>
|
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">过滤规则 :</x:String>
|
||||||
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本地分支</x:String>
|
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本地分支</x:String>
|
||||||
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">定位HEAD</x:String>
|
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">定位HEAD</x:String>
|
||||||
|
|
|
@ -503,7 +503,7 @@
|
||||||
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">設定本存放庫</x:String>
|
<x:String x:Key="Text.Repository.Configure" xml:space="preserve">設定本存放庫</x:String>
|
||||||
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
|
<x:String x:Key="Text.Repository.Continue" xml:space="preserve">下一步</x:String>
|
||||||
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在檔案瀏覽器中開啟</x:String>
|
<x:String x:Key="Text.Repository.Explore" xml:space="preserve">在檔案瀏覽器中開啟</x:String>
|
||||||
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速搜尋分支、標籤、子模組</x:String>
|
<x:String x:Key="Text.Repository.Filter" xml:space="preserve">快速搜尋分支/標籤/子模組</x:String>
|
||||||
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">篩選規則:</x:String>
|
<x:String x:Key="Text.Repository.FilterCommitPrefix" xml:space="preserve">篩選規則:</x:String>
|
||||||
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本機分支</x:String>
|
<x:String x:Key="Text.Repository.LocalBranches" xml:space="preserve">本機分支</x:String>
|
||||||
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">回到 HEAD</x:String>
|
<x:String x:Key="Text.Repository.NavigateToCurrentHead" xml:space="preserve">回到 HEAD</x:String>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SourceGit.ViewModels
|
namespace SourceGit.ViewModels
|
||||||
|
@ -50,6 +51,7 @@ namespace SourceGit.ViewModels
|
||||||
_basedOn = branch.Head;
|
_basedOn = branch.Head;
|
||||||
|
|
||||||
BasedOn = branch;
|
BasedOn = branch;
|
||||||
|
SignTag = new Commands.Config(repo.FullPath).Get("tag.gpgsign").Equals("true", StringComparison.OrdinalIgnoreCase);
|
||||||
View = new Views.CreateTag() { DataContext = this };
|
View = new Views.CreateTag() { DataContext = this };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +61,7 @@ namespace SourceGit.ViewModels
|
||||||
_basedOn = commit.SHA;
|
_basedOn = commit.SHA;
|
||||||
|
|
||||||
BasedOn = commit;
|
BasedOn = commit;
|
||||||
|
SignTag = new Commands.Config(repo.FullPath).Get("tag.gpgsign").Equals("true", StringComparison.OrdinalIgnoreCase);
|
||||||
View = new Views.CreateTag() { DataContext = this };
|
View = new Views.CreateTag() { DataContext = this };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,17 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_instance == null)
|
if (_instance != null)
|
||||||
{
|
return _instance;
|
||||||
_isLoading = true;
|
|
||||||
_instance = Load();
|
_isLoading = true;
|
||||||
_isLoading = false;
|
_instance = Load();
|
||||||
}
|
_isLoading = false;
|
||||||
|
|
||||||
_instance.PrepareGit();
|
_instance.PrepareGit();
|
||||||
_instance.PrepareShellOrTerminal();
|
_instance.PrepareShellOrTerminal();
|
||||||
_instance.PrepareWorkspaces();
|
_instance.PrepareWorkspaces();
|
||||||
|
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,8 @@
|
||||||
Fill="DarkOrange"/>
|
Fill="DarkOrange"/>
|
||||||
<TextBlock Grid.Column="1" Margin="8,0,0,0"
|
<TextBlock Grid.Column="1" Margin="8,0,0,0"
|
||||||
Text="{DynamicResource Text.Checkout.Commit.Warning}"
|
Text="{DynamicResource Text.Checkout.Commit.Warning}"
|
||||||
TextWrapping="Wrap"/>
|
TextWrapping="Wrap"
|
||||||
|
Foreground="DarkOrange"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
Fill="DarkOrange"/>
|
Fill="DarkOrange"/>
|
||||||
<TextBlock Margin="4,0,0,0"
|
<TextBlock Margin="4,0,0,0"
|
||||||
Text="{DynamicResource Text.Discard.Warning}"
|
Text="{DynamicResource Text.Discard.Warning}"
|
||||||
Foreground="{DynamicResource Brush.FG2}"/>
|
Foreground="DarkOrange"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<ContentControl Margin="0,16,0,8" Content="{Binding Mode}">
|
<ContentControl Margin="0,16,0,8" Content="{Binding Mode}">
|
||||||
|
|
|
@ -137,7 +137,22 @@ namespace SourceGit.Views
|
||||||
SetIfChanged(config, "gpg.format", GPGFormat.Value, "openpgp");
|
SetIfChanged(config, "gpg.format", GPGFormat.Value, "openpgp");
|
||||||
|
|
||||||
if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal))
|
if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal))
|
||||||
SetIfChanged(config, $"gpg.{GPGFormat.Value}.program", GPGExecutableFile, "");
|
{
|
||||||
|
var oldGPG = string.Empty;
|
||||||
|
if (GPGFormat.Value == "openpgp" && config.TryGetValue("gpg.program", out var openpgp))
|
||||||
|
oldGPG = openpgp;
|
||||||
|
else if (config.TryGetValue($"gpg.{GPGFormat.Value}.program", out var gpgProgram))
|
||||||
|
oldGPG = gpgProgram;
|
||||||
|
|
||||||
|
bool changed = false;
|
||||||
|
if (!string.IsNullOrEmpty(oldGPG))
|
||||||
|
changed = oldGPG != GPGExecutableFile;
|
||||||
|
else if (!string.IsNullOrEmpty(GPGExecutableFile))
|
||||||
|
changed = true;
|
||||||
|
|
||||||
|
if (changed)
|
||||||
|
new Commands.Config(null).Set($"gpg.{GPGFormat.Value}.program", GPGExecutableFile);
|
||||||
|
}
|
||||||
|
|
||||||
base.OnClosing(e);
|
base.OnClosing(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,13 +128,7 @@
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
Watermark="{DynamicResource Text.Repository.Filter}"
|
Watermark="{DynamicResource Text.Repository.Filter}"
|
||||||
Text="{Binding Filter, Mode=TwoWay}"
|
Text="{Binding Filter, Mode=TwoWay}"
|
||||||
VerticalContentAlignment="Center">
|
VerticalContentAlignment="Center">
|
||||||
<TextBox.Styles>
|
|
||||||
<Style Selector="TextBox /template/ TextBlock#PART_Watermark">
|
|
||||||
<Setter Property="FontSize" Value="12"/>
|
|
||||||
</Style>
|
|
||||||
</TextBox.Styles>
|
|
||||||
|
|
||||||
<TextBox.InnerLeftContent>
|
<TextBox.InnerLeftContent>
|
||||||
<Path Width="14" Height="14"
|
<Path Width="14" Height="14"
|
||||||
Margin="6,0,0,0"
|
Margin="6,0,0,0"
|
||||||
|
|
Loading…
Reference in a new issue