Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlonix <flonix@bezdeka.de>2011-12-15 16:03:48 +0400
committernulltoken <emeric.fermas@gmail.com>2011-12-15 16:46:01 +0400
commit60a85a7713febf77069da2a56ac42a418d21f024 (patch)
tree6e5302ec3c5760ef56e55dc8485887481c3cd5f9 /LibGit2Sharp/Index.cs
parentfc334d2e61b77ceb1621a05efc0a658023608d47 (diff)
Make Index.Remove() cope with files which have been modified in the working directory
Fixes issue #95 - 2/2. One can't GitRemove a modified file. $ mkdir test $ cd test $ git init . $ echo "a" > a.txt $ git add . $ git commit -m "Initial commit" $ echo "b" >> a.txt $ git status no changes added to commit (use "git add" and/or "git commit -a") $ git rm a.txt error: 'a.txt' has local modifications (use --cached to keep the file, or -f to force removal)
Diffstat (limited to 'LibGit2Sharp/Index.cs')
-rw-r--r--LibGit2Sharp/Index.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/LibGit2Sharp/Index.cs b/LibGit2Sharp/Index.cs
index c2844385..900fc1d8 100644
--- a/LibGit2Sharp/Index.cs
+++ b/LibGit2Sharp/Index.cs
@@ -343,7 +343,7 @@ namespace LibGit2Sharp
throw new NotImplementedException();
}
- if (!keyValuePair.Value.HasAny(new[] { FileStatus.Nonexistent, FileStatus.Removed, FileStatus.Untracked }))
+ if (!keyValuePair.Value.HasAny(new[] { FileStatus.Nonexistent, FileStatus.Removed, FileStatus.Modified, FileStatus.Untracked }))
{
continue;
}