Hello!
I'm a new user of Python and pygit2, I think I found some bug.
I'm trying to code the scripts from the code below using pygit2 and I'm having problems.
Bash code sample
➜ git init new
➜ cd new
➜ new git:(master) echo Hello > file.txt
➜ new git:(master) ✗ git add file.txt
➜ new git:(master) ✗ git status
...
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: file.txt
➜ new git:(master) ✗ rm file.txt
➜ new git:(master) ✗ git status
...
Changes to be committed:
new file: file.txt
Changes not staged for commit:
deleted: file.txt
➜ new git:(master) ✗ git add file.txt
➜ new git:(master) git status
...
nothing to commit (create/copy files and use "git add" to track)
pygit2 code sample (could be added into test/test_index.py)
def test_remove_tracked_file_and_stage_changes(testrepo):
index = testrepo.index
real_path_to_file = (testrepo.path.replace("/.git", "")) + '/hello.txt'
os.remove(real_path_to_file)
assert {'bye.txt': 128, 'hello.txt': 512} == testrepo.status()
index.add('hello.txt')
Error

At the stage when I try to add a deleted file to the index (stage), the error is returned: file.txt' in stat: No such file or directory
Hello!
I'm a new user of Python and pygit2, I think I found some bug.
I'm trying to code the scripts from the code below using pygit2 and I'm having problems.
Bash code sample
pygit2 code sample (could be added into test/test_index.py)
Error
At the stage when I try to add a deleted file to the index (stage), the error is returned:
file.txt' in stat: No such file or directory