Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Commit 27411bf

Browse files
committed
Merge pull request libgit2#929 from zpete/zpete/assume_unchanged
Expose the assume-unchanged flag to IndexEntry
2 parents 2f1c52f + 6f16791 commit 27411bf

File tree

19 files changed

+65
-1
lines changed

19 files changed

+65
-1
lines changed

LibGit2Sharp.Tests/IndexFixture.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,20 @@ public void CanMimicGitAddAll()
466466
}
467467
}
468468

469+
[Fact]
470+
public void RetrievingAssumedUnchangedMarkedIndexEntries()
471+
{
472+
var path = SandboxAssumeUnchangedTestRepo();
473+
using (var repo = new Repository(path))
474+
{
475+
var regularFile = repo.Index["hello.txt"];
476+
Assert.False(regularFile.AssumeUnchanged);
477+
478+
var assumeUnchangedFile = repo.Index["world.txt"];
479+
Assert.True(assumeUnchangedFile.AssumeUnchanged);
480+
}
481+
}
482+
469483
private static void AddSomeCornerCases(Repository repo)
470484
{
471485
// Turn 1.txt into a directory in the Index
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Initial commit
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ref: refs/heads/master
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[core]
2+
repositoryformatversion = 0
3+
filemode = false
4+
bare = false
5+
logallrefupdates = true
6+
symlinks = false
7+
ignorecase = true
8+
hideDotFiles = dotGitOnly
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# git ls-files --others --exclude-from=.git/info/exclude
2+
# Lines that start with '#' are comments.
3+
# For a project mostly in C, the following would be a good set of
4+
# exclude patterns (uncomment them if you want to use them):
5+
# *.[oa]
6+
# *~
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0000000000000000000000000000000000000000 872129051d644790636b416d1ef1ec830c5f6b90 nulltoken <emeric.fermas@gmail.com> 1422023333 +0100 commit (initial): Initial commit
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0000000000000000000000000000000000000000 872129051d644790636b416d1ef1ec830c5f6b90 nulltoken <emeric.fermas@gmail.com> 1422023333 +0100 commit (initial): Initial commit

LibGit2Sharp.Tests/Resources/assume_unchanged_wd/dot_git/objects/87/2129051d644790636b416d1ef1ec830c5f6b90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
x��I
2+
B1]��>��'��[����� ��o���U/�Z�n�i"���5�S�Q�hC��.��n��<I!UP�3w�WЎRfS�+U9l�Fu����\�����\�3rD��:����-��
3+
�:� �>=?

0 commit comments

Comments
 (0)