Skip to content

Commit

Permalink
Remove redundant check of branch.[branch].remote.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmarcusreid committed Jan 16, 2017
1 parent bfdac1e commit 5169165
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/GitStatusCache/src/Git.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,20 +268,14 @@ bool Git::GetRefStatus(Git::Status& status, UniqueGitRepository& repository)
result = git_branch_upstream(&upstream.get(), head.get());
if (result == GIT_ENOTFOUND)
{
auto upstreamRemoteName = git_buf{ 0 };
auto upstreamRemoteResult = git_branch_upstream_remote(
&upstreamRemoteName,
git_reference_owner(head.get()),
git_reference_name(head.get()));

auto upstreamBranchName = git_buf{ 0 };
auto upstreamBranchResult = git_branch_upstream_name(
&upstreamBranchName,
git_reference_owner(head.get()),
git_reference_name(head.get()));

auto canBuildUpstream = false;
if (upstreamRemoteResult == GIT_OK && upstreamBranchResult == GIT_OK)
if (upstreamBranchResult == GIT_OK)
{
Log("Git.GetRefStatus.UpstreamGone", Severity::Spam)
<< R"(Branch has a configured upstream that is gone. { "repositoryPath": ")" << status.RepositoryPath
Expand Down

0 comments on commit 5169165

Please sign in to comment.