Gitpython: repo.index.add -> check if input is a list

Created on 3 Dec 2018  路  1Comment  路  Source: gitpython-developers/GitPython

For stupid people like me:
Could you please add a check if the input to repo.index.add(...) is a list, and not a string?
It took me a while to find out that this was the real error behind:

ValueError: Absolute path '\' is not in git repository at 'C:\Users\xxx\yyy\zzz'

:-)

enhancement help wanted

Most helpful comment

What I hear is that if this function is passed a string, the result is unexpected as it is treated as a list. Instead it should check if a singular item was passed, being either a string or one of the other supported objects, and put it into a list automatically.

A PR which implements this would be appreciated.

>All comments

What I hear is that if this function is passed a string, the result is unexpected as it is treated as a list. Instead it should check if a singular item was passed, being either a string or one of the other supported objects, and put it into a list automatically.

A PR which implements this would be appreciated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cool-RR picture cool-RR  路  4Comments

crazyhouse33 picture crazyhouse33  路  3Comments

johnlinp picture johnlinp  路  6Comments

aaronlelevier picture aaronlelevier  路  5Comments

theckman picture theckman  路  6Comments