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

git-rev-sync

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-rev-sync - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

14

index.js

@@ -50,3 +50,15 @@ 'use strict';

var gitDir = getGitDir()
var ref = fs.readFileSync(path.resolve(gitDir, 'refs', 'heads', b), 'utf8')
var refsFilePath = path.resolve(gitDir, 'refs', 'heads', b)
var ref;
if (fs.existsSync(refsFilePath)) {
ref = fs.readFileSync(refsFilePath, 'utf8')
} else {
// If there isn't an entry in /refs/heads for this branch, it may be that
// the ref is stored in the packfile (.git/packed-refs). Fall back to
// looking up the hash here.
var refToFind = path.join('refs', 'heads', b)
var packfileContents = fs.readFileSync(path.resolve(gitDir, 'packed-refs'), 'utf8')
var packfileRegex = new RegExp('(.*) ' + refToFind)
ref = packfileRegex.exec(packfileContents)[1]
}
return ref.trim()

@@ -53,0 +65,0 @@ }

6

package.json
{
"name": "git-rev-sync",
"version": "1.0.0",
"version": "1.1.0",
"author": "kurttheviking",

@@ -15,3 +15,3 @@ "bugs": {

{
"name": "jden",
"name": "Jason Denizac",
"email": "jason@denizac.org",

@@ -44,4 +44,4 @@ "url": "http://jden.us"

"dependencies": {
"graceful-fs": "^3.0.5"
"graceful-fs": "3.0.8"
}
}
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