New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

atom-libgit2-log-utils

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-libgit2-log-utils

Simple utility functions for fetching git history using libgit2 built for the Atom editor

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

atom-libgit2-log-utils

Simple utility functions for fetching git history using nodegit (libgit2) built for Atom.

This package wraps the libgit2-log-utils package to work in the Atom editor environment. See libgit2-log-utils for tests and actual source.

Installation (from your Atom package's source root):

npm install atom-libgit2-log-utils

Usage

var gitLogUtils = require('atom-libgit2-log-utils');

gitLogUtils.getCommitHistory("myPath/maybeMyFile")
.then(function(history) {
  return console.log(JSON.stringify(history, null, 2));
})
.catch(function(error) {
  return console.error(error);
});

...will produce...

[
  {
    "id": "233b26b3a1e212e50693e2e41f2252afa7ebf16d",
    "author": "Bee",
    "authorDate": 1461978358000,
    "message": "output linesAdded and linesDeleted for each file",
    "body": "",
    "hash": "233b26b3a1e212e50693e2e41f2252afa7ebf16d",
    "linesAdded": 35,
    "linesDeleted": 15,
    "files": [
      {
        "path": "package.json",
        "linesAdded": 3,
        "linesDeleted": 1
      },
      {
        "path": "src/libgit2-log-utils.coffee",
        "linesAdded": 31,
        "linesDeleted": 13
      },
      {
        "path": "test/scripts/getLogJson.coffee",
        "linesAdded": 1,
        "linesDeleted": 1
      }
    ]
  },
  {
     "id": "more like the above ..."
  }
]

The getCommitHistory() method will accept a file or directory and can also handle absolute (full path) path specifications.

Keywords

FAQs

Package last updated on 01 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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