Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
80abca2
Remove IGitService dependency from RepositoryModel
jcansdale Oct 23, 2018
1177e93
Move LocalRepositoryModel ctor into GitService 1/2
jcansdale Oct 23, 2018
c6c8b84
Move LocalRepositoryModel ctor into GitService 2/2
jcansdale Oct 23, 2018
edb8232
Fix tests after LocalRepositoryModel refactor
jcansdale Oct 23, 2018
835e561
Move GenerateUrl to LinkCommandBase
jcansdale Oct 23, 2018
fe2dcf8
Convert LocalRepositoryModel to GitService tests
jcansdale Oct 23, 2018
683ad50
Move LocalReposotoryModel.Refresh to GitService
jcansdale Oct 23, 2018
59e5652
Remove LocalRepositoryModel.HeadSha property
jcansdale Oct 23, 2018
01d2e46
Remove CreateLocalRepositoryModel overload
jcansdale Oct 23, 2018
7bab478
Read the current branch when model is created
jcansdale Oct 23, 2018
e3f8114
Clean up LocalRepositoryModel
jcansdale Oct 23, 2018
2f13d62
ClonePath -> CloneUri
jcansdale Oct 30, 2018
c61d0f2
Make GitService.Refresh the CurrentBranch
jcansdale Oct 30, 2018
473fa48
Merge branch 'master' into fixes/2007-refactor-repository-models
jcansdale Oct 30, 2018
47430fd
Add workaround for out of date CurrentBranch issue
jcansdale Oct 31, 2018
713d9c4
Refactor to IGitService.CreateCurrentBranchModel
jcansdale Oct 31, 2018
0f59f7e
Make GetPullRequestForCurrentBranch return (tuple)
jcansdale Oct 31, 2018
42d09fa
Avoid firing StatusChanged if we're not on a repo
jcansdale Oct 31, 2018
a47af2b
Suppress "Do not directly await a Task" warning
jcansdale Oct 31, 2018
db41ef9
Get rid of LocalRepositoryModelFactory
jcansdale Oct 31, 2018
06d17e0
Merge branch 'master' into fixes/2007-refactor-repository-models
jcansdale Oct 31, 2018
a4c8386
Rename IGitService.Refresh to RefreshCloneUrl
jcansdale Oct 31, 2018
eb7f1db
Remove repo watching responsibilities from TESH
jcansdale Nov 1, 2018
925279f
Remove obsolete RefreshCloneUrl API
jcansdale Nov 1, 2018
c16c91c
Remove unused logger
jcansdale Nov 1, 2018
5fddfa8
Add xmldocs to ITeamExplorerServiceHolder
jcansdale Nov 1, 2018
2b160f8
Fix error CA2214
jcansdale Nov 1, 2018
bf4c2f9
Remove commented out code
jcansdale Nov 1, 2018
1d92bef
Add comment about when StatusChanged fires
jcansdale Nov 2, 2018
bccfbd0
Rename CreateCurrentBranchModel to GetBranch
jcansdale Nov 2, 2018
b1db91f
Remove IGitService dependency from BranchModel
jcansdale Nov 2, 2018
5765c18
Remove Octokit dependency from BranchModel
jcansdale Nov 2, 2018
9e341e0
Remove IBranch interface from BranchModel
jcansdale Nov 2, 2018
d702536
Remove the interface from RepositoryModel
jcansdale Nov 2, 2018
a1ff038
Correct model file names
jcansdale Nov 2, 2018
e2b74f9
Remove interfaces from Remote/RepositoryModel
jcansdale Nov 5, 2018
ec71110
Fix tests that use repository models
jcansdale Nov 5, 2018
dcbf8d1
Fix tests in PullRequestCreationViewModelTests
jcansdale Nov 5, 2018
c360269
Make PrepareTestData default to return no branches
jcansdale Nov 5, 2018
79af9ae
Remove Octokit.Repository dependency
jcansdale Nov 6, 2018
2ef556b
Clean up *Designer classes
jcansdale Nov 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make PrepareTestData default to return no branches
Tests started throwing null reference exceptions when we stopped using
an interface for BranchModel. This makes PrepareTestData default to
return no branches.
  • Loading branch information
jcansdale committed Nov 5, 2018
commit c36026979392217a7c5e71eafd444566ac8319c4
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public PullRequestCreationViewModel(
.Where(_ => TargetBranch != null)
.Subscribe(x =>
{
// HACK: Why is `t` null?
if (!x.Any(t => t != null && t.Equals(TargetBranch)))
//// HACK: Why is `t` null?
//if (!x.Any(t => t != null && t.Equals(TargetBranch)))
if (!x.Any(t => t.Equals(TargetBranch)))
{
TargetBranch = GitHubRepository.IsFork ? GitHubRepository.Parent.DefaultBranch : GitHubRepository.DefaultBranch;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ static TestData PrepareTestData(
api.GetRepository(Args.String, Args.String).Returns(Observable.Return(githubRepo));
ms.ApiClient.Returns(api);

// Default to returning no branches
ms.GetBranches(null).ReturnsForAnyArgs(Observable.Empty<BranchModel>());

// sets up the libgit2sharp repo and branch objects
var l2repo = SetupLocalRepoMock(gitClient, gitService, remote, sourceBranchName, sourceBranchIsTracking);

Expand Down