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

isomorphic-git

Package Overview
Dependencies
Maintainers
1
Versions
408
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isomorphic-git - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

59

dist/for-browserify/index.js

@@ -67,14 +67,19 @@ 'use strict';

}
/**
* @param {string} username
* @param {string} password
* @returns {Git} this
*
* Use with {@link #gitpush .push} and {@link #gitpull .pull} to set Basic Authentication headers.
* This works for basic username / password auth, or the newer username / token auth
* that is often required if 2FA is enabled.
*/
_createClass(Git, [{
key: 'version',
value: function version$$1() {
return commands_js.version();
}
/**
* @param {string} username
* @param {string} password
* @returns {Git} this
*
* Use with {@link #gitpush .push} and {@link #gitpull .pull} to set Basic Authentication headers.
* This works for basic username / password auth, or the newer username / token auth
* that is often required if 2FA is enabled.
*/
_createClass(Git, [{
}, {
key: 'auth',

@@ -137,3 +142,3 @@ value: function auth(username, password) {

value: function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(dir) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(dir) {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -162,3 +167,3 @@ while (1) {

value: function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2() {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -190,3 +195,3 @@ while (1) {

value: function () {
var _ref3 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(ref) {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(ref) {
return _regeneratorRuntime.wrap(function _callee3$(_context3) {

@@ -224,3 +229,3 @@ while (1) {

value: function () {
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(ref) {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(ref) {
return _regeneratorRuntime.wrap(function _callee4$(_context4) {

@@ -255,3 +260,3 @@ while (1) {

value: function () {
var _ref5 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee5(url) {
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(url) {
return _regeneratorRuntime.wrap(function _callee5$(_context5) {

@@ -290,3 +295,3 @@ while (1) {

value: function () {
var _ref6 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee6() {
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
return _regeneratorRuntime.wrap(function _callee6$(_context6) {

@@ -317,3 +322,3 @@ while (1) {

value: function () {
var _ref7 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee7(filepath) {
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(filepath) {
return _regeneratorRuntime.wrap(function _callee7$(_context7) {

@@ -346,3 +351,3 @@ while (1) {

value: function () {
var _ref8 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee8(filepath) {
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(filepath) {
return _regeneratorRuntime.wrap(function _callee8$(_context8) {

@@ -374,3 +379,3 @@ while (1) {

value: function () {
var _ref9 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee9(message) {
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(message) {
return _regeneratorRuntime.wrap(function _callee9$(_context9) {

@@ -415,3 +420,3 @@ while (1) {

value: function () {
var _ref10 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee10(ref) {
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(ref) {
return _regeneratorRuntime.wrap(function _callee10$(_context10) {

@@ -444,3 +449,3 @@ while (1) {

value: function () {
var _ref11 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee11(oids) {
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(oids) {
return _regeneratorRuntime.wrap(function _callee11$(_context11) {

@@ -473,3 +478,3 @@ while (1) {

value: function () {
var _ref12 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee12(oids) {
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(oids) {
return _regeneratorRuntime.wrap(function _callee12$(_context12) {

@@ -501,3 +506,3 @@ while (1) {

value: function () {
var _ref13 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee13(ref) {
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(ref) {
return _regeneratorRuntime.wrap(function _callee13$(_context13) {

@@ -533,3 +538,3 @@ while (1) {

value: function () {
var _ref14 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee14(ref) {
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(ref) {
return _regeneratorRuntime.wrap(function _callee14$(_context14) {

@@ -564,3 +569,3 @@ while (1) {

value: function () {
var _ref15 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee15(path, value) {
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(path, value) {
var _args15 = arguments;

@@ -605,3 +610,3 @@ return _regeneratorRuntime.wrap(function _callee15$(_context15) {

value: function () {
var _ref16 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee16(pathname) {
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(pathname) {
return _regeneratorRuntime.wrap(function _callee16$(_context16) {

@@ -634,3 +639,3 @@ while (1) {

value: function () {
var _ref17 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee17() {
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
return _regeneratorRuntime.wrap(function _callee17$(_context17) {

@@ -637,0 +642,0 @@ while (1) {

@@ -36,3 +36,3 @@ 'use strict';

value: function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
var gitdir = _ref.gitdir;

@@ -68,3 +68,3 @@ var text;

value: function () {
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref3) {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
var gitdir = _ref3.gitdir,

@@ -110,3 +110,3 @@ config = _ref3.config;

value: function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
var gitdir = _ref.gitdir;

@@ -155,3 +155,3 @@ var oids, text;

value: function () {
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref3) {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref3) {
var gitdir = _ref3.gitdir,

@@ -252,3 +252,3 @@ oids = _ref3.oids;

value: function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(filepath, closure) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(filepath, closure) {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -259,3 +259,3 @@ while (1) {

_context2.next = 2;
return lock.acquire(filepath, _asyncToGenerator(_regeneratorRuntime.mark(function _callee() {
return lock.acquire(filepath, _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
var index, rawIndexFile, buffer$$1;

@@ -387,3 +387,3 @@ return _regeneratorRuntime.wrap(function _callee$(_context) {

value: function () {
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref3 /*: {gitdir: string, oid: string} */) {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3 /*: {gitdir: string, oid: string} */) {
var gitdir = _ref3.gitdir,

@@ -432,3 +432,3 @@ oid = _ref3.oid;

value: function () {
var _ref6 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(_ref5) {
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref5) {
var gitdir = _ref5.gitdir,

@@ -463,3 +463,3 @@ type = _ref5.type,

value: function () {
var _ref8 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(_ref7) {
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref7) {
var gitdir = _ref7.gitdir,

@@ -535,3 +535,3 @@ type = _ref7.type,

value: function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
var gitdir = _ref.gitdir,

@@ -817,3 +817,3 @@ remote = _ref.remote,

value: function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee() {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -843,3 +843,3 @@ while (1) {

value: function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2() {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -869,3 +869,3 @@ while (1) {

value: function () {
var _ref3 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(service /*: string */) {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(service /*: string */) {
var _this = this;

@@ -1050,3 +1050,3 @@

value: function () {
var _ref5 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee4(stream$$1 /*: ReadableStream */) {
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(stream$$1 /*: ReadableStream */) {
var service, res;

@@ -1082,3 +1082,3 @@ return _regeneratorRuntime.wrap(function _callee4$(_context4) {

value: function () {
var _ref6 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee5(stream$$1 /*: ReadableStream */) {
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(stream$$1 /*: ReadableStream */) {
var service, res;

@@ -1114,3 +1114,3 @@ return _regeneratorRuntime.wrap(function _callee5$(_context5) {

value: function () {
var _ref8 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee7(_ref7) {
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref7) {
var _stream = _ref7.stream,

@@ -1160,3 +1160,3 @@ service = _ref7.service;

nextBit = function () {
var _ref9 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee6() {
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
var line, error;

@@ -1163,0 +1163,0 @@ return _regeneratorRuntime.wrap(function _callee6$(_context6) {

@@ -228,3 +228,3 @@ 'use strict';

value: function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(privateKeys /*: string */) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(privateKeys /*: string */) {
var commit, headers, message$$1, privKeyObj, _ref2, signature, signedCommit;

@@ -276,3 +276,3 @@

value: function () {
var _ref3 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2() {
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
var msg;

@@ -305,3 +305,3 @@ return _regeneratorRuntime.wrap(function _callee2$(_context2) {

value: function () {
var _ref4 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(publicKeys /*: string */) {
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(publicKeys /*: string */) {
var pubKeyObj, msg, results, validity;

@@ -477,3 +477,3 @@ return _regeneratorRuntime.wrap(function _callee3$(_context3) {

value: function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(path) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(path) {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -502,3 +502,3 @@ while (1) {

value: function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(path, value) {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(path, value) {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -684,3 +684,3 @@ while (1) {

return function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee() {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
var hexlength, length, bytes;

@@ -863,3 +863,3 @@ return _regeneratorRuntime.wrap(function _callee$(_context) {

key: _Symbol$iterator,
value: _regeneratorRuntime.mark(function value() {
value: /*#__PURE__*/_regeneratorRuntime.mark(function value() {
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, entry;

@@ -1154,3 +1154,3 @@

key: _Symbol$iterator,
value: _regeneratorRuntime.mark(function value() {
value: /*#__PURE__*/_regeneratorRuntime.mark(function value() {
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, entry;

@@ -1157,0 +1157,0 @@

@@ -21,3 +21,3 @@ 'use strict';

var rm = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(filepath) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(filepath) {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -61,3 +61,3 @@ while (1) {

var exists = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(file, options) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file, options) {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -167,3 +167,3 @@ while (1) {

var sleep = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(ms) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(ms) {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -195,3 +195,3 @@ while (1) {

var lock = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(filename /*: string */
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(filename /*: string */
) {

@@ -259,3 +259,3 @@ var triesLeft /*: number */ = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;

var unlock = function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee3(filename /*: string */
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(filename /*: string */
) {

@@ -278,3 +278,3 @@ var _this = this;

// But really we wait a bit to see if you want to acquire it again.
delayedReleases.set(filename, setTimeout(_asyncToGenerator(_regeneratorRuntime.mark(function _callee2() {
delayedReleases.set(filename, setTimeout(_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -311,3 +311,3 @@ while (1) {

var mkdir = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(dirpath /*: string */) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(dirpath /*: string */) {
var parent;

@@ -382,3 +382,3 @@ return _regeneratorRuntime.wrap(function _callee$(_context) {

var mkdirs = function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee2(dirlist /*: string[] */) {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(dirlist /*: string[] */) {
return _regeneratorRuntime.wrap(function _callee2$(_context2) {

@@ -405,3 +405,3 @@ while (1) {

var read = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(file, options) {
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file, options) {
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -431,3 +431,3 @@ while (1) {

var resolveRef = function () {
var _ref2 = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(_ref) {
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
var gitdir = _ref.gitdir,

@@ -575,3 +575,3 @@ ref = _ref.ref,

var write = function () {
var _ref = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(filepath /*: string */
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(filepath /*: string */
, contents /*: string|Buffer */

@@ -615,10 +615,11 @@ ) {

var name = "isomorphic-git";
var version = "0.0.16";
var description = "Node library for interacting with git repositories, circa 2017";
var version = "0.0.17";
var description = "A pure JavaScript implementation of git for node and browsers!";
var main = "dist/for-node/";
var browser = "dist/for-browserify/";
var module$1 = "dist/for-future/";
var unpkg = "dist/bundle.umd.min.js";
var bin = { "isogit": "./cli.js" };
var engines = { "node": ">=7.6.0" };
var scripts = { "start": "nps", "test": "nps test", "precommit": "nps format" };
var scripts = { "start": "nps", "test": "nps test", "precommit": "nps format toc" };
var repository = { "type": "git", "url": "git+https://github.com/wmhilton/isomorphic-git.git" };

@@ -631,4 +632,4 @@ var keywords = ["git"];

var files = ["dist", "cli.js"];
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ini": "^1.3.4", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^1.1.0", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "thru": "git+https://github.com/wmhilton-contrib/thru.git#master" };
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^2.3.0", "husky": "^0.14.3", "jest": "^21.2.1", "jest-fixtures": "^0.6.0", "jsonfile": "^3.0.1", "karma": "^1.7.1", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^6.0.0", "rollup": "^0.50.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watchify": "^3.9.0" };
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ini": "^1.3.4", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^2.0.1", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "thru": "git+https://github.com/wmhilton-contrib/thru.git#master" };
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^2.3.0", "doctoc": "^1.3.0", "husky": "^0.14.3", "jest": "^21.2.1", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^1.7.1", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^7.0.1", "rollup": "^0.50.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watchify": "^3.9.0" };
var ava = { "source": ["dist/for-node/*"] };

@@ -645,2 +646,3 @@ var browserify = { "transform": ["browserify-shim"] };

module: module$1,
unpkg: unpkg,
bin: bin,

@@ -672,2 +674,3 @@ engines: engines,

module: module$1,
unpkg: unpkg,
bin: bin,

@@ -674,0 +677,0 @@ engines: engines,

@@ -844,2 +844,8 @@ import path from 'path';

export { add, clone, checkout, commit, fetch, init, list, listCommits, listObjects, pack, push, remove, config, unpack, verify, status, findRoot, listBranches };
var version$1 = "0.0.17";
function version() {
return version$1;
}
export { add, clone, checkout, commit, fetch, init, list, listCommits, listObjects, pack, push, remove, config, unpack, verify, status, findRoot, listBranches, version };

@@ -1,2 +0,2 @@

import { add, checkout, clone, commit, config, fetch, findRoot, init, list, listBranches, pack, push, remove, status, unpack, verify } from './commands.js';
import { add, checkout, clone, commit, config, fetch, findRoot, init, list, listBranches, pack, push, remove, status, unpack, verify, version } from './commands.js';

@@ -20,2 +20,5 @@ function git(dir) {

}
version() {
return version();
}
/**

@@ -22,0 +25,0 @@ * @param {string} username

@@ -216,10 +216,11 @@ import systemfs from 'fs';

var name = "isomorphic-git";
var version = "0.0.16";
var description = "Node library for interacting with git repositories, circa 2017";
var version = "0.0.17";
var description = "A pure JavaScript implementation of git for node and browsers!";
var main = "dist/for-node/";
var browser = "dist/for-browserify/";
var module$1 = "dist/for-future/";
var unpkg = "dist/bundle.umd.min.js";
var bin = { "isogit": "./cli.js" };
var engines = { "node": ">=7.6.0" };
var scripts = { "start": "nps", "test": "nps test", "precommit": "nps format" };
var scripts = { "start": "nps", "test": "nps test", "precommit": "nps format toc" };
var repository = { "type": "git", "url": "git+https://github.com/wmhilton/isomorphic-git.git" };

@@ -232,4 +233,4 @@ var keywords = ["git"];

var files = ["dist", "cli.js"];
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ini": "^1.3.4", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^1.1.0", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "thru": "git+https://github.com/wmhilton-contrib/thru.git#master" };
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^2.3.0", "husky": "^0.14.3", "jest": "^21.2.1", "jest-fixtures": "^0.6.0", "jsonfile": "^3.0.1", "karma": "^1.7.1", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^6.0.0", "rollup": "^0.50.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watchify": "^3.9.0" };
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ini": "^1.3.4", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^2.0.1", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "thru": "git+https://github.com/wmhilton-contrib/thru.git#master" };
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^2.3.0", "doctoc": "^1.3.0", "husky": "^0.14.3", "jest": "^21.2.1", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^1.7.1", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^7.0.1", "rollup": "^0.50.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watchify": "^3.9.0" };
var ava = { "source": ["dist/for-node/*"] };

@@ -246,2 +247,3 @@ var browserify = { "transform": ["browserify-shim"] };

module: module$1,
unpkg: unpkg,
bin: bin,

@@ -273,2 +275,3 @@ engines: engines,

module: module$1,
unpkg: unpkg,
bin: bin,

@@ -275,0 +278,0 @@ engines: engines,

@@ -850,2 +850,8 @@ 'use strict';

var version$1 = "0.0.17";
function version() {
return version$1;
}
exports.add = add;

@@ -869,1 +875,2 @@ exports.clone = clone;

exports.listBranches = listBranches;
exports.version = version;

@@ -22,2 +22,5 @@ 'use strict';

}
version() {
return commands_js.version();
}
/**

@@ -24,0 +27,0 @@ * @param {string} username

@@ -222,10 +222,11 @@ 'use strict';

var name = "isomorphic-git";
var version = "0.0.16";
var description = "Node library for interacting with git repositories, circa 2017";
var version = "0.0.17";
var description = "A pure JavaScript implementation of git for node and browsers!";
var main = "dist/for-node/";
var browser = "dist/for-browserify/";
var module$1 = "dist/for-future/";
var unpkg = "dist/bundle.umd.min.js";
var bin = { "isogit": "./cli.js" };
var engines = { "node": ">=7.6.0" };
var scripts = { "start": "nps", "test": "nps test", "precommit": "nps format" };
var scripts = { "start": "nps", "test": "nps test", "precommit": "nps format toc" };
var repository = { "type": "git", "url": "git+https://github.com/wmhilton/isomorphic-git.git" };

@@ -238,4 +239,4 @@ var keywords = ["git"];

var files = ["dist", "cli.js"];
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ini": "^1.3.4", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^1.1.0", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "thru": "git+https://github.com/wmhilton-contrib/thru.git#master" };
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^2.3.0", "husky": "^0.14.3", "jest": "^21.2.1", "jest-fixtures": "^0.6.0", "jsonfile": "^3.0.1", "karma": "^1.7.1", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^6.0.0", "rollup": "^0.50.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watchify": "^3.9.0" };
var dependencies = { "async-lock": "^1.0.0", "await-stream-ready": "^1.0.1", "babel-runtime": "^6.26.0", "buffer": "^5.0.7", "buffer-peek-stream": "^1.0.1", "buffercursor": "0.0.12", "gartal": "^1.1.2", "git-apply-delta": "0.0.7", "git-list-pack": "0.0.10", "ini": "^1.3.4", "minimisted": "^2.0.0", "openpgp": "^2.5.10", "pad": "^2.0.1", "pako": "^1.0.5", "pify": "^3.0.0", "shasum": "^1.0.2", "simple-concat": "^1.0.0", "simple-get": "^2.7.0", "thru": "git+https://github.com/wmhilton-contrib/thru.git#master" };
var devDependencies = { "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.0", "babel-preset-flow": "^6.23.0", "ban-sensitive-files": "^1.9.0", "browserfs": "^1.4.3", "browserify": "^14.4.0", "browserify-shim": "^3.8.14", "codecov": "^2.3.0", "doctoc": "^1.3.0", "husky": "^0.14.3", "jest": "^21.2.1", "jest-fixtures": "^0.6.0", "jsonfile": "^4.0.0", "karma": "^1.7.1", "karma-browserify": "^5.1.1", "karma-chrome-launcher": "^2.2.0", "karma-firefox-launcher": "^1.0.1", "karma-sauce-launcher": "^1.2.0", "karma-tap": "^3.1.1", "lodash": "^4.17.4", "nock": "^9.0.17", "npm-run-all": "^4.1.1", "nps": "^5.7.1", "nps-utils": "^1.4.0", "parse-header-stream": "^1.1.1", "prettier-standard": "^7.0.1", "rollup": "^0.50.0", "rollup-plugin-babel": "^3.0.2", "rollup-plugin-json": "^2.3.0", "standard": "^10.0.3", "stream-equal": "^1.0.1", "tape": "^4.8.0", "uglify-es": "^3.1.2", "watchify": "^3.9.0" };
var ava = { "source": ["dist/for-node/*"] };

@@ -252,2 +253,3 @@ var browserify = { "transform": ["browserify-shim"] };

module: module$1,
unpkg: unpkg,
bin: bin,

@@ -279,2 +281,3 @@ engines: engines,

module: module$1,
unpkg: unpkg,
bin: bin,

@@ -281,0 +284,0 @@ engines: engines,

{
"name": "isomorphic-git",
"version": "0.0.16",
"description": "Node library for interacting with git repositories, circa 2017",
"version": "0.0.17",
"description": "A pure JavaScript implementation of git for node and browsers!",
"main": "dist/for-node/",
"browser": "dist/for-browserify/",
"module": "dist/for-future/",
"unpkg": "dist/bundle.umd.min.js",
"bin": {

@@ -17,3 +18,3 @@ "isogit": "./cli.js"

"test": "nps test",
"precommit": "nps format"
"precommit": "nps format toc"
},

@@ -50,3 +51,3 @@ "repository": {

"openpgp": "^2.5.10",
"pad": "^1.1.0",
"pad": "^2.0.1",
"pako": "^1.0.5",

@@ -71,6 +72,7 @@ "pify": "^3.0.0",

"codecov": "^2.3.0",
"doctoc": "^1.3.0",
"husky": "^0.14.3",
"jest": "^21.2.1",
"jest-fixtures": "^0.6.0",
"jsonfile": "^3.0.1",
"jsonfile": "^4.0.0",
"karma": "^1.7.1",

@@ -88,3 +90,3 @@ "karma-browserify": "^5.1.1",

"parse-header-stream": "^1.1.1",
"prettier-standard": "^6.0.0",
"prettier-standard": "^7.0.1",
"rollup": "^0.50.0",

@@ -91,0 +93,0 @@ "rollup-plugin-babel": "^3.0.2",

@@ -1,46 +0,101 @@

# isomorphic-git [![Build Status](https://travis-ci.org/wmhilton/isomorphic-git.svg?branch=master)](https://travis-ci.org/wmhilton/isomorphic-git) [![codecov](https://codecov.io/gh/wmhilton/isomorphic-git/branch/master/graph/badge.svg)](https://codecov.io/gh/wmhilton/isomorphic-git)
JavaScript library for interacting with git repositories, circa 2017
# isomorphic-git ![node version](https://img.shields.io/node/v/isomorphic-git.svg) [![Build Status](https://travis-ci.org/wmhilton/isomorphic-git.svg?branch=master)](https://travis-ci.org/wmhilton/isomorphic-git) [![codecov](https://codecov.io/gh/wmhilton/isomorphic-git/branch/master/graph/badge.svg)](https://codecov.io/gh/wmhilton/isomorphic-git) [![dependencies](https://david-dm.org/wmhilton/isomorphic-git/status.svg)](https://david-dm.org/wmhilton/isomorphic-git) [![Greenkeeper badge](https://badges.greenkeeper.io/wmhilton/isomorphic-git.svg)](https://greenkeeper.io/)
A pure JavaScript implementation of git for node and browsers!
[![Sauce Test Status](https://saucelabs.com/browser-matrix/_wmhilton.svg)](https://saucelabs.com/u/_wmhilton)
Isomorphic-git is a pure ECMAScript 2017+ re-implementation of [git](https://git-scm.com/)
that works on the desktop and on the web. On the desktop (or laptop, whatever) it
uses Node and its core "fs" library. On the web, it works with any modern browser
(see list above) and the [BrowserFS](https://www.npmjs.com/package/browserfs)
library. This means you can do all the same things you are used to doing on
your desktop - git pull, git commit, git push - in the browser.
It works with any modern browser (see list above) and uses [BrowserFS](https://www.npmjs.com/package/browserfs) to emulate the node 'fs' module. This means client-side JavaScript can be used to read *and write* to the web the same way you've been editing websites on your desktop since 2008 - using git.
**This is a big deal.** Git is the lingua fraca of source code control, and
the web is made out of source code. Client-side JavaScript can now be used to read
*and write* to the web the same way you've been editing websites on your desktop
since 2008 - using git.
Isomorphic-git does not impliment every feature found in the canonical git implementation. But it does aim for 100% compatibility. This means it does all its operations by modifying files in a ".git" directory just like the git you are used to. You can even use the `isogit` CLI to operate on existing git repositories on your desktop or server.
Isomorphic-git does not impliment every feature found in the canonical git
implementation. But it does aim to be 100% compatible with it. This means it
does all its operations by modifying files in a ".git" directory just like the
git you are used to. You can use the `isogit` CLI to operate on existing git
repositories on your desktop or server.
<hr>
## Installing
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
Just your standard
- [Getting Started](#getting-started)
- [Set up your filesystem](#set-up-your-filesystem)
- [Using a CDN script tag](#using-a-cdn-script-tag)
- [Using as an npm module](#using-as-an-npm-module)
- [`isogit` CLI](#isogit-cli)
- [High-level `git()` API](#high-level-git-api)
- [git(dir) vs .gitdir(dir) and .workdir(dir)](#gitdir-vs-gitdirdir-and-workdirdir)
- [.init()](#init)
- [.clone(url)](#cloneurl)
- [.fetch(branch)](#fetchbranch)
- [.checkout(branch)](#checkoutbranch)
- [.list()](#list)
- [.add(file)](#addfile)
- [.remove(file)](#removefile)
- [.commit(msg)](#commitmsg)
- [.push(branch)](#pushbranch)
- [.findRoot(dir)](#findrootdir)
- [.listBranches()](#listbranches)
- [.config(path)](#configpath)
- [.config(path, value)](#configpath-value)
- [.auth(username, password_or_token)](#authusername-password_or_token)
- [.oauth2(company, token)](#oauth2company-token)
- [.version()](#version)
- [Lower-level API](#lower-level-api)
- [Commands](#commands)
- [Managers](#managers)
- [Models](#models)
- [Utils](#utils)
- [Who is using `isomorphic-git`?](#who-is-using-isomorphic-git)
- [Similar projects](#similar-projects)
- [Acknowledgments](#acknowledgments)
- [License](#license)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<hr>
## Getting Started
### Set up your filesystem
If you're only using `isomorphic-git` in Node, you already have a `fs` module, so you can skip this step. If you're writing code for the browser though, you'll need something that emulates the `fs` API. `isomorphic-git` will look for a global "fs" variable. At the time of writing, the most complete option is [BrowserFS](https://github.com/jvilk/BrowserFS).
Here's a quick config that works well in most cases:
```html
<script src="https://unpkg.com/browserfs"></script>
<script>
BrowserFS.configure({ fs: "IndexedDB", options: {} }, err => {
if (err) {
alert(err);
} else {
window.fs = BrowserFS.BFSRequire("fs");
}
});
</script>
```
npm install --save isomorphic-git
```
## Using
Besides IndexedDB, BrowserFS supports many different backends with different performance characteristics, as well as advanced configurations such as: multiple mounting points, and overlaying a writeable filesystems on top of a read-only filesystem. You don't need to know about all these features, but familiarizing yourself with the different options may be necessary if you hit a storage limit or performance bottleneck in the IndexedDB backend I suggested above.
### CDN script tag
### Using a CDN script tag
You can grab the UMD build directly from `unpkg`.
If you want, you can just throw in a script tag with the UMD build directly from `unpkg`. This will result in three global variables: `BrowserFS`, `fs`, and `git`.
```html
<script src="https://unpkg.com/isomorphic-git@0.0.15/dist/bundle.umd.min.js"></script>
<script src="https://unpkg.com/browserfs"></script>
<script>
BrowserFS.configure({ fs: "IndexedDB", options: {} }, function (err) {
if (err) return console.log(err);
window.fs = BrowserFS.BFSRequire("fs");
});
</script>
<script src="https://unpkg.com/isomorphic-git"></script>
```
### With Node or a module bundler
### Using as an npm module
In the package.json you'll see there are 3 different versions. The "main" version is for node. The "browser" version is for browserify. If you are using rollup or bleeding edge ES2017+ stuff, you might want to use the "module" version. For more details see [./dist/README.md](https://github.com/wmhilton/isomorphic-git/blob/master/dist/README.md)
You can install it from npm.
```
npm install --save isomorphic-git
```
In the package.json you'll see there are actually 4 different versions:
```json

@@ -50,6 +105,16 @@ "main": "dist/for-node/",

"module": "dist/for-future/",
"unpkg": "dist/bundle.umd.min.js",
```
## `isogit` CLI
This probably deserves a brief explanation.
- the "main" version is for node.
- the "browser" version is for browserify.
- the "module" version is for native ES6 module loaders when they arrive.
- the "unpkg" version is the UMD build.
For more details about each build see [./dist/README.md](https://github.com/wmhilton/isomorphic-git/blob/master/dist/README.md)
### `isogit` CLI
Isomorphic-git comes with a simple CLI tool, named `isogit` because `isomorphic-git` is a lot to type. It is really just a thin shell that translates command line arguments into the equivalent JS API commands. So you should be able to run *any* current or future isomorphic-git commands using the CLI.

@@ -60,11 +125,57 @@ It always starts with an implicit `git('.')` so it defaults to working in the

## API docs
## High-level `git()` API
I may continue to make small changes to the API until the 1.0 release, after which I promise not to make any breaking changes.
### Initialize a new repository
### git(dir) vs .gitdir(dir) and .workdir(dir)
Setting the working directory and git directory
For regular repositories (with a `.git` directory inside them) you simply pass the directory as the initial argument to `git()`.
In this case, the git directory is set implicitly to `path.join(workdir, '.git')`.
However, if you are working with bare repositories, that assumption is wrong. In this case, you can use the second version to specify the directories explicitly.
```js
// JS example
import git from 'isomorphic-git'
git('./path/to/repo')
// second way
git()
.gitdir('my-bare-repo')
.workdir('/var/www/website')
```
```sh
# CLI example
cd ./path/to/repo
isogit
# second way
isogit --gitdir=my-bare-repo --workdir=/var/www/website
```
```js
// Complete API
git(workdir)
// second way
git()
.gitdir(gitdir)
.workdir(workdir)
```
- @param {string} `workdir` - The path to the working directory.
The working directory is where your files are checked out.
Usually this is the parent directory of ".git" but it doesn't have to be.
- @param {string} `gitdir` - The path to the git directory.
The git directory is where your git repository history is stored.
Usually this is a directory called ".git" inside your working directory.
### .init()
Initialize a new repository
```js
// JS example
import git from 'isomorphic-git'
git('.').init()

@@ -88,3 +199,4 @@ ```

### Clone a repository
### .clone(url)
Clone a repository

@@ -126,3 +238,4 @@ ```js

### Fetch commits
### .fetch(branch)
Fetch commits

@@ -163,3 +276,4 @@ ```js

## Checkout a branch
### .checkout(branch)
Checkout a branch

@@ -193,3 +307,4 @@ ```js

### List all the tracked files in a repo
### .list()
List all the tracked files in a repo

@@ -218,3 +333,4 @@ ```js

### Add files to the git index (aka staging area)
### .add(file)
Add files to the git index (aka staging area)

@@ -246,3 +362,4 @@ ```js

### Remove files from the git index (aka staging area)
### .remove(file)
Remove files from the git index (aka staging area)

@@ -272,3 +389,4 @@ ```js

### Create a new commit
### .commit(msg)
Create a new commit

@@ -316,3 +434,4 @@ ```js

### Push a branch
### .push(branch)
Push a branch

@@ -353,3 +472,4 @@ ```js

### Find the root git directory
### .findRoot(dir)
Find the root git directory

@@ -379,3 +499,4 @@ ```js

### List all local branches
### .listBranches()
List all local branches

@@ -403,3 +524,4 @@ ```js

### Reading from git config
### .config(path)
Reading from git config

@@ -430,3 +552,4 @@ ```js

### Writing to git config
### .config(path, value)
Writing to git config

@@ -456,4 +579,3 @@ ```js

### All authentication options
### .auth(username, password_or_token)
Authentication is normally required for pushing to a git repository.

@@ -469,7 +591,2 @@ It may also be required to clone or fetch from a private repository.

If you are using OAuth2 for token-based authentication, then the form
that the Basic Auth headers take is slightly different. To help with
those cases, there is an `oauth2()` method that is available as an
alternative to the `auth()` method.
```js

@@ -488,3 +605,11 @@ // This works for basic username / password auth, or the newer username / token auth

git('.').auth('personal access token') // Github (only) lets you leave out the username
```
### .oauth2(company, token)
If you are using OAuth2 for token-based authentication, then the form
that the Basic Auth headers take is slightly different. To help with
those cases, there is an `oauth2()` method that is available as an
alternative to the `auth()` method.
```js
// OAuth2 Token Authentication

@@ -505,33 +630,14 @@ // This for is for *actual* OAuth2 tokens (not "personal access tokens").

### Using a non-standard working tree or git directory
### .version()
If you are working with bare repos, you may have situations where
the git directory is not `path.join(workdir, '.git')`.
If that is the case, you can specify the two directories explicitly.
```js
// JS example
import git from 'isomorphic-git'
git()
.gitdir('my-bare-repo')
.workdir('/var/www/website')
console.log(git().version())
```
```sh
# CLI example
isogit --gitdir=my-bare-repo --workdir=/var/www/website
```
- @returns {string} `version` - the version string from package.json
- @param {string} `workdir` - The path to the working directory.
## Lower-level API
The working directory is where your files are checked out.
Usually this is the parent directory of ".git" but it doesn't have to be.
- @param {string} `gitdir` - The path to the git directory.
The git directory is where your git repository history is stored.
Usually this is a directory called ".git" inside your working directory.
## Lower-level API (also unstable)
The high-level makes some assumptions (like you have a file-system and network access) that might not be well suited

@@ -591,2 +697,7 @@ to your embedded git-based concept thingy. Fear not! I have written this library

## Who is using `isomorphic-git`?
- [nde](https://nde.now.sh) - a futuristic next-generation web IDE
- [git-app-manager](https://git-app-manager-tcibxepsta.now.sh) - install "unhosted" websites locally by git cloning them
## Similar projects

@@ -597,3 +708,3 @@

## Credits
## Acknowledgments

@@ -600,0 +711,0 @@ Isomorphic-git would not have been possible without the pioneering work by

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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