-
Notifications
You must be signed in to change notification settings - Fork 899
.gitignore not in root folder is ignored #764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@FallenGameR Thanks for this report! @arrbee How do you feel about this? |
This sounds like it could be one of the bugs fixed in libgit2/libgit2#2262 libgit2/libgit2#2279. @FallenGameR what version of libgit2sharp are you using? Let's track that back to libgit2 and see if you're using a version that has the ignore fixes. This also be complicated by using |
To @arrbee
InternalName : git2-11f8336.dll
Yes. But in git for windows is works both ways. |
Was this issue fixed? It looks like we just hit this problem again: |
I've added a test commit to this issue. FWIW the test passes on my Win box and Travis seems happy with it as well. Could you please ensure that I've correctly expressed your constraints? |
How do we get the win dll with the fix for the test? |
I've ran the test using the dll embedded in the |
Which DLL are you looking for? For the LibGit2Sharp DLL, can you clone / fetch the repository, check out the branch with the fix (ntk/ignore), and build it? |
Did it. Thanks! We are testing the fix. Will respond if that change fixed it. |
The fix didn't work for us :( We have repro with this repository setup:
Git.exe thinks index is clean, lib2git considers it dirty. |
@FallenGameR - that is unfortunate. Would you be able to repro this in a failing test by any chance? or provide a specific repro setup that exhibits this issue? This might make it easier / quicker for someone to investigate the issue. Thanks! |
@FallenGameR Hey! Is this still an issue for you or has it been fixed meanwhile? |
No idea. We are switching to native git, so this problem is not pressing anymore. |
string path = InitNewRepository(); | ||
using (var repo = new Repository(path)) | ||
{ | ||
Touch(repo.Info.WorkingDirectory, ".gitignore", string.Format("{0}fixes{1}Fixes.zip{1}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading this once again, I now realized that the provided test doesn't reflect was was intended.
Former self, you're an idiot. The .gitignore
should be located in a nested folder. Not at the root.
This PR has been updated. I believe this is now correctly reproducing the test case describe in #764 (comment) |
.gitignore not in root folder is ignored
If you create a folder and place .gitignore file there:
D:\repo\Reports\Acl_report
» type .gitignore
\fixes
Fixes.zip
DeviceStatistic.csv
PolicyStatistic.csv
The files mentioned in that .gitignore file would be ignored by git, but LibGti2Sharp would list them as untracked. That makes automation that uses LibGit2Sharp buggy - before push it tests if index is dirty. LibGit2 says it is, git says it is not.
PS Possible it is a limitation of lib2git - I don't know. If that is the case - please repost this bug or advice where do lib2git tracks bugs.