mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
code_review: review for PR (#147)
* code style * localizations for zh_CN
This commit is contained in:
parent
e00bc4e630
commit
66f2aab6a7
11 changed files with 43 additions and 51 deletions
|
@ -8,6 +8,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
private const string PREFIX_LOCAL = "refs/heads/";
|
||||
private const string PREFIX_REMOTE = "refs/remotes/";
|
||||
private const string PREFIX_DETACHED = "(HEAD detached at";
|
||||
|
||||
[GeneratedRegex(@"^(\d+)\s(\d+)$")]
|
||||
private static partial Regex REG_AHEAD_BEHIND();
|
||||
|
@ -52,9 +53,9 @@ namespace SourceGit.Commands
|
|||
if (refName.EndsWith("/HEAD", StringComparison.Ordinal))
|
||||
return;
|
||||
|
||||
if (refName.StartsWith("(HEAD detached at"))
|
||||
if (refName.StartsWith(PREFIX_DETACHED, StringComparison.Ordinal))
|
||||
{
|
||||
branch.isHead = true;
|
||||
branch.IsHead = true;
|
||||
}
|
||||
|
||||
if (refName.StartsWith(PREFIX_LOCAL, StringComparison.Ordinal))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue