From 8191758a97bff569b3b4f2595a5a09dd36dcb3fb Mon Sep 17 00:00:00 2001 From: ZCShou <72115@163.com> Date: Thu, 27 May 2021 14:23:06 +0800 Subject: [PATCH] =?UTF-8?q?optimize:=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=AF=B9=E4=BA=8E=E7=A9=BA=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E5=BB=BA=E7=AB=8B=E5=88=86=E6=94=AF=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Resources/Locales/en_US.xaml | 1 + src/Resources/Locales/zh_CN.xaml | 1 + src/Views/Widgets/Dashboard.xaml.cs | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Resources/Locales/en_US.xaml b/src/Resources/Locales/en_US.xaml index 933c3ff2..e2ba8ddd 100644 --- a/src/Resources/Locales/en_US.xaml +++ b/src/Resources/Locales/en_US.xaml @@ -96,6 +96,7 @@ Stash & Reapply Discard Check out after created + Git do not hold any branch until you do first commit. Create Tag New Tag At : diff --git a/src/Resources/Locales/zh_CN.xaml b/src/Resources/Locales/zh_CN.xaml index 5e436495..94fd0028 100644 --- a/src/Resources/Locales/zh_CN.xaml +++ b/src/Resources/Locales/zh_CN.xaml @@ -96,6 +96,7 @@ 贮藏并自动恢复 忽略 完成后切换到新分支 + 对于空仓库,只有提交一次有效数据,Git 才会创建第一个分支 新建标签 标签位于 : diff --git a/src/Views/Widgets/Dashboard.xaml.cs b/src/Views/Widgets/Dashboard.xaml.cs index e9950d50..38c0d2cb 100644 --- a/src/Views/Widgets/Dashboard.xaml.cs +++ b/src/Views/Widgets/Dashboard.xaml.cs @@ -401,7 +401,11 @@ namespace SourceGit.Views.Widgets { private void OpenNewBranch(object sender, RoutedEventArgs e) { var current = repo.Branches.Find(x => x.IsCurrent); - if (current != null) new Popups.CreateBranch(repo, current).Show(); + if (current != null) { + new Popups.CreateBranch(repo, current).Show(); + } else { + Models.Exception.Raise(App.Text("CreateBranch.Idle")); + } e.Handled = true; }