samypesse / gitkit-js Goto Github PK
View Code? Open in Web Editor NEWPure javascript implementation of Git (Node.js and Browser)
License: Apache License 2.0
Pure javascript implementation of Git (Node.js and Browser)
License: Apache License 2.0
The add operation should create the .git/index
file if it doesn't already exist.
It is due to this call from the WorkingUtils.add function:
https://github.com/SamyPesse/gitkit-js/blob/master/lib/models/workingIndex.js#L82-L94
What is the effective difference between this and NodeGit? Maybe the fact it runs in the browser? Can we have a table of comparison between both in the README so that we can understand what are the differences and adapt to our use cases?
Thanks.
Library looks really cool, but given the size of the API (and lack of docs), it could be extremely helpful to have TypeScript definitions that editors could use for suggestions on the method names, types etc.
As stated at NodeOS/NodeOS#67 (comment), add support to make gitkit
capable to be used by npm
as a valid git
cli command. Needed functionality is:
The README points to LICENSE.md, but this repository has LICENSE
instead of LICENSE.md
, thus resulting in a 404 error when clicking it on GitHub.
Hey there!
I'd like to report a security issue but cannot find contact instructions on your repository.
If not a hassle, might you kindly add a SECURITY.md
file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.
Thank you for your consideration, and I look forward to hearing from you!
(cc @huntr-helper)
Hi! Very interesting project. Thanks a lot for sharing!
I was wondering whether you'd consider revising naming conventions to be a bit less verbose and closer to git's syntax. What I mean is:
const git = new GitKit({
repo: REPOSITORY_URL,
user: REPOSITORY_USER
});
git.commit('initial commit, '*');
git.commit('initial commit, [
'app.js',
'scripts.js'
]);
git.branch.current()
git.branch.checkout('develop/feature/profile-update')
Not all of them would be as simple of course, since checkout()
might also need to be accompanied by checkoutNew
etc. but I hope you know what I mean.
Please update the README with guidance about How to use gitkit inside the browser.
Using GitKit v0.1.0 to clone a repository with isBare = false
I get the aforementioned error. Setting isBare
to true
doesn't give the error.
var isBare = false;
var repo = GitKit.Repository.createWithFS(NodeFS('/tmp/repo'), isBare);
var transport = new GitKit.HTTPTransport('https://github.com/marcuswhybrow/marcus.codes.git');
GitKit.RepoUtils.init(repo)
.then(() => GitKit.TransferUtils.clone(repo, transport))
This is my stack trace:
"assertPath (path.js:8:11)",
"Object.posix.join (path.js:479:5)",
"Record.Repository.getGitPath (/var/task/node_modules/gitkit/lib/models/repo.js:65:43)",
"Record.Repository.readGitFile (/var/task/node_modules/gitkit/lib/models/repo.js:75:21)",
"Function.Ref.readFromRepo (/var/task/node_modules/gitkit/lib/models/ref.js:85:17)",
"Object.checkout (/var/task/node_modules/gitkit/lib/RepoUtils/checkout.js:79:16)",
"/var/task/node_modules/gitkit/lib/TransferUtils/clone.js:18:26",
"_fulfilled (/var/task/node_modules/gitkit/node_modules/q/q.js:834:54)",
"self.promiseDispatch.done (/var/task/node_modules/gitkit/node_modules/q/q.js:863:30)",
"Promise.promise.promiseDispatch (/var/task/node_modules/gitkit/node_modules/q/q.js:796:13)"
I'd like to be able to point to an https url such as https://git.coolaj86.com/greenlock.js retrieve a list of branches and tags, such as v.2.2 and v2.2.3, and then shallow clone that tag.
I'd like to know
A) if this is already possible
B) what it would cost for it to be built if it isn't
It looks like this requires a command line git before it can be installed because when I try to install this in a container on https://hyperdev.com/, I get the following in error logs:
ERR! git clone --template=/app/.npm/_git-remotes/_templates --mirror [email protected]:deoxxa/dissolve.git /app/.npm/_git-remotes/git-github-com-deoxxa-dissolve-git-4ec7095e: undefined
npm ERR! git clone --template=/app/.npm/_git-remotes/_templates --mirror [email protected]:deoxxa/dissolve.git /app/.npm/_git-remotes/git-github-com-deoxxa-dissolve-git-4ec7095e: undefined
ERR! Linux 4.4.8-fc
npm ERR! argv "/app/.nodejs/bin/node" "/app/.nodejs/bin/npm" "install"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
ERR! code ENOGIT
npm ERR! not found: git
npm ERR!
npm
ERR! Failed using git.
npm
ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.
GitKit currently only implements an FS for Node.js, it should provides an FS storing file in the localstorage/memory.
What are the major differences?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.