8000 Fix TrackedBranch property on DetachedHead branches · Saaman/libgit2sharp@30b554c · GitHub
[go: up one dir, main page]

Skip to content

Commit 30b554c

Browse files
committed
Fix TrackedBranch property on DetachedHead branches
1 parent 5800408 commit 30b554c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

LibGit2Sharp.Tests/BranchFixture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@ public void DetachedHeadIsNotATrackingBranch()
594594
repo.Checkout(headSha);
595595

596596
Assert.False(repo.Head.IsTracking);
597+
Assert.Null(repo.Head.TrackedBranch);
597598
}
598599
}
599600
}

LibGit2Sharp/DetachedHead.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ protected override string Shorten(string branchName)
1313
}
1414

1515
/// <summary>
16-
/// Determines if this local branch is connected to a remote one.
16+
/// Gets the remote branch which is connected to this local one, or null if there is none.
1717
/// </summary>
18-
public override bool IsTracking
18+
public override Branch TrackedBranch
1919
{
20-
get
21-
{
22-
return false;
23-
}
20+
get { return null; }
2421
}
2522
}
2623
}

0 commit comments

Comments
 (0)
0