Skip to content

Commit

Permalink
go指令支持cleanbranch
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed Nov 19, 2021
1 parent 9a1270b commit f359532
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/gitm-go.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ program.action(async (command: string): Promise<void> => {
'copy',
'get',
'save',
'cleanbranch',
'clean',
'revert',
'link',
Expand Down
8 changes: 8 additions & 0 deletions bin/js/go/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const startConfig = require('../../conf/start')
const copyConfig = require('../../conf/copy')
const getConfig = require('../../conf/get')
const saveConfig = require('../../conf/save')
const cleanbranchConfig = require('../../conf/cleanbranch')
const cleanConfig = require('../../conf/clean')
const revertConfig = require('../../conf/revert')
const linkConfig = require('../../conf/link')
Expand Down Expand Up @@ -134,6 +135,13 @@ export const save = async () => {
sh.exec(command)
}

// 清理合并过的功能分支
export const cleanbranch = async () => {
const config = cleanConfigSet(cleanbranchConfig)
const command = 'gitm cleanbranch ' + (await getCommand(config))
sh.exec(command)
}

// 清理缓存
export const clean = async () => {
const config = cleanConfigSet(cleanConfig)
Expand Down

1 comment on commit f359532

@vercel
Copy link

@vercel vercel bot commented on f359532 Nov 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.