From 891a9443817329492c75ad99b8ff8899c460dee1 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sun, 27 Aug 2017 17:37:12 +0100 Subject: 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. https://github.com/git/git/commit/d426430e6ec2a05bf0a4ee88c319dd6072908504 --- git.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'git.py') diff --git a/git.py b/git.py index 636f3a2..2240175 100644 --- a/git.py +++ b/git.py @@ -525,7 +525,10 @@ class Tree: cmd.t = None cmd.arg(self.ref) - cmd.arg(path) + if not path: + cmd.arg(".") + else: + cmd.arg(path) for l in cmd.run(): _mode, otype, _oid, size, name = l.split(None, 4) -- cgit v1.2.3