git: Don't use an empty pathspec when listing
An empty string as a pathspec element matches all paths, but git has
recently started complaining about it, as it could be problematic for
some operations like rm. In the future, it will be considered an error.
So this patch uses "." instead of the empty pathspec, as recommended.
d426430e6e
This commit is contained in:
parent
d7f0e4a265
commit
891a944381
5
git.py
5
git.py
@ -525,7 +525,10 @@ class Tree:
|
|||||||
cmd.t = None
|
cmd.t = None
|
||||||
|
|
||||||
cmd.arg(self.ref)
|
cmd.arg(self.ref)
|
||||||
cmd.arg(path)
|
if not path:
|
||||||
|
cmd.arg(".")
|
||||||
|
else:
|
||||||
|
cmd.arg(path)
|
||||||
|
|
||||||
for l in cmd.run():
|
for l in cmd.run():
|
||||||
_mode, otype, _oid, size, name = l.split(None, 4)
|
_mode, otype, _oid, size, name = l.split(None, 4)
|
||||||
|
Loading…
Reference in New Issue
Block a user