feat: add expand_dir opts for git_status (#591)
* feat: add expand_dir opts for git_status * make -u as the default
This commit is contained in:
@@ -127,7 +127,14 @@ end
|
|||||||
|
|
||||||
git.status = function(opts)
|
git.status = function(opts)
|
||||||
local gen_new_finder = function()
|
local gen_new_finder = function()
|
||||||
local output = utils.get_os_command_output({ 'git', 'status', '-s', '--', '.' }, opts.cwd)
|
local expand_dir = utils.if_nil(opts.expand_dir, true, opts.expand_dir)
|
||||||
|
local git_cmd = {'git', 'status', '-s', '--', '.'}
|
||||||
|
|
||||||
|
if expand_dir then
|
||||||
|
table.insert(git_cmd, table.getn(git_cmd) - 1, '-u')
|
||||||
|
end
|
||||||
|
|
||||||
|
local output = utils.get_os_command_output(git_cmd, opts.cwd)
|
||||||
|
|
||||||
if table.getn(output) == 0 then
|
if table.getn(output) == 0 then
|
||||||
print('No changes found')
|
print('No changes found')
|
||||||
|
|||||||
Reference in New Issue
Block a user