diff options
author | Alberto Bertogli <albertito@blitiri.com.ar> | 2017-08-27 18:37:12 +0200 |
---|---|---|
committer | Alberto Bertogli <albertito@blitiri.com.ar> | 2017-08-27 18:37:12 +0200 |
commit | 891a9443817329492c75ad99b8ff8899c460dee1 (patch) | |
tree | a900bae80f7ccd5e92ed7c07651aee053c8c6570 | |
parent | d7f0e4a2650734581d88b5c949868a8e7bcf788d (diff) | |
download | git-arr-fork-891a9443817329492c75ad99b8ff8899c460dee1.zip |
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
-rw-r--r-- | git.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |