Skip to content

Commit

Permalink
update: update some for git commands
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed May 11, 2022
1 parent 7dba778 commit 119d1f6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
6 changes: 6 additions & 0 deletions app/Console/CliApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Inhere\Kite\Console\Listener\BeforeCommandRunListener;
use Inhere\Kite\Console\Listener\BeforeRunListener;
use Inhere\Kite\Console\Listener\NotFoundListener;
use Inhere\Kite\Console\Manager\ToolManager;
use Inhere\Kite\Console\Plugin\PluginManager;
use Inhere\Kite\Kite;
use Inhere\Kite\Lib\Jump\QuickJump;
Expand Down Expand Up @@ -93,6 +94,11 @@ protected function registerServices(ObjectBox $box): void
return new PluginManager($config);
});

$box->set('toolManager', function () {
$config = $this->getArrayParam('toolManager');
return new ToolManager($config);
});

$box->set('scriptRunner', function () {
$config = $this->getArrayParam('scriptRunner');
$scripts = $this->getArrayParam('scripts');
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Controller/Gitx/GitController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Inhere\Kite\Common\CmdRunner;
use Inhere\Kite\Common\GitLocal\GitHub;
use Inhere\Kite\Console\Component\Clipboard;
use Inhere\Kite\Console\Manage\GitBranchManage;
use Inhere\Kite\Console\Manager\GitBranchManager;
use Inhere\Kite\Helper\AppHelper;
use Inhere\Kite\Helper\GitUtil;
use PhpGit\Changelog\Filter\KeywordsFilter;
Expand Down Expand Up @@ -343,7 +343,7 @@ public function branchUpdateCommand(FlagsParser $fs, Output $output): void
{
$remote = $fs->getArg('remote', 'origin');

$gbm = new GitBranchManage();
$gbm = new GitBranchManager();
$gbm->update([$remote]);

$output->success('Complete');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace Inhere\Kite\Console\Manage;
namespace Inhere\Kite\Console\Manager;

/**
* Class GitBranchManage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php declare(strict_types=1);

namespace Inhere\Kite\Console\Manage;
namespace Inhere\Kite\Console\Manager;

use Inhere\Kite\Common\CmdRunner;

Expand All @@ -9,12 +9,14 @@
*
* @package Inhere\Kite\Console\Manage
*/
class GitBranchManage extends BaseGitManage
class GitBranchManager extends BaseGitManage
{
/**
* update branch list from remote
*
* @param array $remotes
* @param bool $usePull
*
* @return void
*/
public function update(array $remotes = [], bool $usePull = false): void
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php declare(strict_types=1);

namespace Inhere\Kite\Console\Manage;
namespace Inhere\Kite\Console\Manager;

/**
* Class GitLogManage
*
* @package Inhere\Kite\Console\Manage
*/
class GitLogManage
class GitLogManager
{

}

0 comments on commit 119d1f6

Please sign in to comment.