dugite-extra
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -5,5 +5,5 @@ import { IGitExecutionOptions } from '../core/git'; | ||
export declare function listBranch(repositoryPath: string, type: 'local' | 'remote' | 'all', options?: IGitExecutionOptions): Promise<Branch[]>; | ||
export declare function createBranch(repositoryPath: string, name: string, options?: { | ||
export declare function createBranch(repositoryPath: string, name: string, createOptions?: { | ||
startPoint?: string; | ||
}): Promise<void>; | ||
}, options?: IGitExecutionOptions): Promise<void>; | ||
export declare function renameBranch(repositoryPath: string, name: string, newName: string, renameOptions?: { | ||
@@ -10,0 +10,0 @@ force?: boolean; |
@@ -122,3 +122,3 @@ "use strict"; | ||
exports.listBranch = listBranch; | ||
function createBranch(repositoryPath, name, options) { | ||
function createBranch(repositoryPath, name, createOptions, options) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -129,3 +129,3 @@ var startPoint, args; | ||
case 0: | ||
startPoint = options ? options.startPoint : undefined; | ||
startPoint = createOptions ? createOptions.startPoint : undefined; | ||
args = ['branch', name]; | ||
@@ -135,3 +135,3 @@ if (startPoint) { | ||
} | ||
return [4 /*yield*/, git_1.git(args, repositoryPath, 'createBranch')]; | ||
return [4 /*yield*/, git_1.git(args, repositoryPath, 'createBranch', options)]; | ||
case 1: | ||
@@ -138,0 +138,0 @@ _a.sent(); |
@@ -16,4 +16,4 @@ import { IGitExecutionOptions } from '../core/git'; | ||
*/ | ||
export declare function fetch(repositoryPath: string, remote: string, exec: IGitExecutionOptions.ExecFunc, progressCallback?: (progress: IFetchProgress) => void): Promise<void>; | ||
export declare function fetch(repositoryPath: string, remote: string, exec?: IGitExecutionOptions.ExecFunc, progressCallback?: (progress: IFetchProgress) => void): Promise<void>; | ||
/** Fetch a given refspec from the given remote. */ | ||
export declare function fetchRefspec(repositoryPath: string, remote: string, refspec: string, exec?: IGitExecutionOptions.ExecFunc): Promise<void>; |
{ | ||
"name": "dugite-extra", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "High-level Git commands for dugite.", | ||
@@ -59,2 +59,2 @@ "main": "lib/index", | ||
} | ||
} | ||
} |
@@ -54,4 +54,4 @@ import { git, IGitExecutionOptions } from '../core/git'; | ||
export async function createBranch(repositoryPath: string, name: string, options?: { startPoint?: string }): Promise<void> { | ||
const startPoint = options ? options.startPoint : undefined; | ||
export async function createBranch(repositoryPath: string, name: string, createOptions?: { startPoint?: string }, options?: IGitExecutionOptions): Promise<void> { | ||
const startPoint = createOptions ? createOptions.startPoint : undefined; | ||
const args = ['branch', name]; | ||
@@ -61,3 +61,3 @@ if (startPoint) { | ||
} | ||
await git(args, repositoryPath, 'createBranch'); | ||
await git(args, repositoryPath, 'createBranch', options); | ||
} | ||
@@ -64,0 +64,0 @@ |
@@ -18,3 +18,3 @@ import { git, IGitExecutionOptions } from '../core/git'; | ||
*/ | ||
export async function fetch(repositoryPath: string, remote: string, exec: IGitExecutionOptions.ExecFunc, progressCallback?: (progress: IFetchProgress) => void): Promise<void> { | ||
export async function fetch(repositoryPath: string, remote: string, exec?: IGitExecutionOptions.ExecFunc, progressCallback?: (progress: IFetchProgress) => void): Promise<void> { | ||
let opts: IGitExecutionOptions = { | ||
@@ -21,0 +21,0 @@ successExitCodes: new Set([0]), |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
678902