Call git log through bash for globstar support

This commit is contained in:
kiendang 2019-03-18 03:05:30 +08:00
parent 6be6bba0be
commit 00f74902d4

View File

@ -22,7 +22,7 @@ module Git
"log", "--format=%h", "--abbrev=7", "--max-count=1", "--name-only",
*args, "--", file
]
out, = Open3.capture3(cmd.join(" "))
out, = Open3.capture3("/bin/bash", "-c", cmd.join(" "))
rev, *files = out.chomp.split(/\n/).reject(&:empty?)
[rev, files]
end