Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert some changes that were causing unit test failures.

  • Loading branch information...
commit 020ac78fe0d5cf31f958b30eae4c5455a51a6512 1 parent 35507d1
@slluis slluis authored
View
4 GitSharp.Tests/GitSharp/StatusTests.cs
@@ -154,7 +154,7 @@ void RunStatusTests(StatusOperation oper)
filesToCheck.Clear ();
results = oper (repo, filesToCheck);
AssertStatus (results, filesToCheck, filename, results.Untracked);
- AssertStatus (results, filesToCheck, filenameSubdir1, results.Removed);
+ AssertStatus (results, filesToCheck, filenameSubdir1, results.Missing); // FIXME: should be Removed??
AssertStatus (results, filesToCheck, filenameSubdir2, results.Untracked);
// Stage the file removal
@@ -181,7 +181,7 @@ void RunStatusTests(StatusOperation oper)
filesToCheck.Clear ();
results = oper (repo, filesToCheck);
AssertStatus (results, filesToCheck, filename, results.Untracked);
- AssertStatus (results, filesToCheck, filenameSubdir1, results.Added, results.Removed);
+ AssertStatus (results, filesToCheck, filenameSubdir1, results.Added, results.Missing); // FIXME: should be Removed??
AssertStatus (results, filesToCheck, filenameSubdir2, results.Untracked);
}
}
View
8 GitSharp/RepositoryStatus.cs
@@ -64,7 +64,6 @@ public RepositoryStatus(Repository repository, RepositoryStatusOptions options)
{
Repository = repository;
Options = options;
- IgnoreHandler = new IgnoreHandler(Repository);
_root_path = string.Empty;
_recursive = true;
Update();
@@ -147,6 +146,7 @@ public void Update()
Modified = new HashSet<string>();
Untracked = new HashSet<string>();
MergeConflict = new HashSet<string>();
+ IgnoreHandler = new IgnoreHandler(Repository);
if (_file_path != null)
UpdateSingleFile (_file_path);
@@ -338,11 +338,7 @@ private void OnVisitEntry(TreeEntry treeEntry, TreeEntry wdirEntry, GitIndex.Ent
}
if (!file.Exists)
{
- // If the file is not stagged, it's a removed file, not a missing file
- if (indexEntry.Mtime != indexEntry.Ctime)
- path_status = OnMissing(indexEntry.Name, path_status);
- else
- path_status = OnRemoved(indexEntry.Name, path_status);
+ path_status = OnMissing(indexEntry.Name, path_status);
}
if (file.Exists && indexEntry.IsModified(new DirectoryInfo(Repository.WorkingDirectory), Options.ForceContentCheck))
{
Please sign in to comment.
Something went wrong with that request. Please try again.