Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dugite-extra

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dugite-extra - npm Package Compare versions

Comparing version 0.0.1-alpha.12 to 0.0.1-alpha.13

5

lib/command/pull.d.ts

@@ -9,2 +9,5 @@ import { IPullProgress } from '../progress';

*
* @param branch - The name of the branch to pull from. It is required when pulling from a remote which is
* not the default remote tracking of the currently active branch.
*
* @param progressCallback - An optional function which will be invoked

@@ -16,2 +19,2 @@ * with information about the current progress

*/
export declare function pull(repositoryPath: string, remote: string, progressCallback?: (progress: IPullProgress) => void): Promise<void>;
export declare function pull(repositoryPath: string, remote: string, branch?: string, progressCallback?: (progress: IPullProgress) => void): Promise<void>;

15

lib/command/pull.js

@@ -47,2 +47,5 @@ "use strict";

*
* @param branch - The name of the branch to pull from. It is required when pulling from a remote which is
* not the default remote tracking of the currently active branch.
*
* @param progressCallback - An optional function which will be invoked

@@ -54,3 +57,3 @@ * with information about the current progress

*/
function pull(repositoryPath, remote, progressCallback) {
function pull(repositoryPath, remote, branch, progressCallback) {
return __awaiter(this, void 0, void 0, function () {

@@ -82,5 +85,9 @@ var opts, title_1, kind_1, args, result;

}
args = progressCallback
? ['pull', '--progress', remote]
: ['pull', remote];
args = ['pull', remote];
if (branch) {
args.push(branch);
}
if (progressCallback) {
args.push('--progress');
}
return [4 /*yield*/, git_1.git(args, repositoryPath, 'pull', opts)];

@@ -87,0 +94,0 @@ case 1:

{
"name": "dugite-extra",
"version": "0.0.1-alpha.12",
"version": "0.0.1-alpha.13",
"description": "High-level Git commands for dugite.",

@@ -5,0 +5,0 @@ "main": "lib/index",

# dugite-extra
[![Build Status](https://travis-ci.org/TypeFox/dugite-extra.svg?branch=master)](https://travis-ci.org/TypeFox/dugite-extra)
[![Build Status](https://travis-ci.org/theia-ide/dugite-extra.svg?branch=master)](https://travis-ci.org/theia-ide/dugite-extra)
[![Build status](https://ci.appveyor.com/api/projects/status/9vpa16w198s9qw12/branch/master?svg=true)](https://ci.appveyor.com/project/kittaakos/dugite-extra/branch/master)

@@ -4,0 +4,0 @@

@@ -12,2 +12,5 @@ import { git, GitError, IGitExecutionOptions } from '../core/git';

*
* @param branch - The name of the branch to pull from. It is required when pulling from a remote which is
* not the default remote tracking of the currently active branch.
*
* @param progressCallback - An optional function which will be invoked

@@ -19,3 +22,3 @@ * with information about the current progress

*/
export async function pull(repositoryPath: string, remote: string, progressCallback?: (progress: IPullProgress) => void): Promise<void> {
export async function pull(repositoryPath: string, remote: string, branch?: string, progressCallback?: (progress: IPullProgress) => void): Promise<void> {
let opts: IGitExecutionOptions = {};

@@ -50,6 +53,12 @@ if (progressCallback) {

const args = progressCallback
? ['pull', '--progress', remote]
: ['pull', remote];
const args = ['pull', remote];
if (branch) {
args.push(branch)
}
if (progressCallback) {
args.push('--progress');
}
const result = await git(args, repositoryPath, 'pull', opts);

@@ -56,0 +65,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc