Skip to content

Conversation

@JPaulDuncan
Copy link
Contributor

No description provided.

@JPaulDuncan JPaulDuncan changed the title Fixes #822 - Move higher level Index related ops. Fix Move higher level Index related ops to IRepository #822 Sep 16, 2014
@JPaulDuncan
Copy link
Contributor Author

Not sure why this test fails...

 [Fact]
        public void CanRemoveAFolderThroughUsageOfPathspecsForNewlyAddedFiles()
        {
            string path = CloneStandardTestRepo();
            using (var repo = new Repository(path))
            {
                repo.Stage(Touch(repo.Info.WorkingDirectory, "2/subdir1/3.txt", "too"));
                repo.Stage(Touch(repo.Info.WorkingDirectory, "2/subdir2/4.txt", "tree"));
                repo.Stage(Touch(repo.Info.WorkingDirectory, "2/5.txt", "for"));
                repo.Stage(Touch(repo.Info.WorkingDirectory, "2/6.txt", "fyve"));

                int count = repo.Index.Count;

                Assert.True(Directory.Exists(Path.Combine(repo.Info.WorkingDirectory, "2")));
                repo.Remove("2", false);

                Assert.Equal(count - 5, repo.Index.Count);
            }
        }

@JPaulDuncan
Copy link
Contributor Author

/cc @nulltoken

@nulltoken
Copy link
Member

Not sure why this test fails...

@JPaulDuncan I'm taking a look.

@nulltoken
Copy link
Member

Could you please remove the methods with nullable parameters from IRepository and move them over to RepositoryExtensions (as you did in #815)?

@@ -104,16 +104,15 @@ public void CanRemoveAFolderThroughUsageOfPathspecsForNewlyAddedFiles()
string path = CloneStandardTestRepo();
using (var repo = new Repository(path))
{
repo.Index.Stage(Touch(repo.Info.WorkingDirectory, "2/subdir1/2.txt", "whone"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line hasn't been ported (only removed). This is why the test fails.

@@ -134,11 +134,10 @@ IEnumerator IEnumerable.GetEnumerator()
/// </summary>
/// <param name="path">The path of the file within the working directory.</param>
/// <param name="stageOptions">If set, determines how paths will be staged.</param>
[Obsolete("This method will be removed in the next release. Use Repository.Stage instead.")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add parentheses after the method name (ie. ...Use Repository.Stage() instead.)

@nulltoken
Copy link
Member

@JPaulDuncan Once you've dealt with the nitpicks above, please squash your commits altogether into one, then rebase your branch onto vNext so we can get it merged. If you're not sure how to do this, let us know, we'll guide you through the process.

FWIW, I don't get automatic notifications when you only push commits. Please add a comment when the code is ready to review (otherwise some days may pass before I happen to notice the PR has been updated).

@nulltoken
Copy link
Member

Superseded by #851

Cheers!

@nulltoken nulltoken closed this Oct 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants