Don’t raise an exception when encountered untracked file
This commit is contained in:
parent
332dc45bf9
commit
424da8b573
|
@ -25,7 +25,10 @@ try:
|
|||
(except for merge statuses as they are not supported by libgit2).
|
||||
'''
|
||||
if path:
|
||||
status = self._repo().status_file(path)
|
||||
try:
|
||||
status = self._repo().status_file(path)
|
||||
except KeyError, ValueError:
|
||||
return None
|
||||
|
||||
if status == git.GIT_STATUS_CURRENT:
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue