GithubHelp home page GithubHelp logo

git-rev's People

Contributors

defunctzombie avatar marcoceppi avatar tblobaum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

git-rev's Issues

.log doesn't properly escape quotes

Causing the following to occur:

co Ceppi" ],[ "81735deeacf3c050b1f73e8923f785cb6c5f5e2d", "Tweaked "messages""
                                                                    ^
SyntaxError: Unexpected token m
    at Object.parse (native)
    at module.exports.log (/home/marco/Projects/ondina/control-panel/node_modules/git-rev/index.js:25:17)
    at /home/marco/Projects/ondina/control-panel/node_modules/git-rev/index.js:5:5
    at ChildProcess.exithandler (child_process.js:538:7)
    at ChildProcess.EventEmitter.emit (events.js:96:17)
    at maybeClose (child_process.js:638:16)
    at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
    at Socket.EventEmitter.emit (events.js:93:17)
    at Socket._destroy.destroyed (net.js:357:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

Have to manually change current working directory

I currently use git-rev as follows:

process.chdir(__dirname)
git.short(function (str) {
  // ...
})

But isn't the first line redundant? In the beginning of git-rev's index.js file, there is this:

exec(cmd, { cwd: __dirname }, function (...) { ... })

So git-rev should automatically take care of changing the current working directory. However, if I simplify my code:

git.short(function (str) {
  // ...
})

Then it doesn't work unless I already am in the correct directory.

Exception when git message commit contains " char

When git commit contains " character throws error:

"Msg "xxx".",
     ^
SyntaxError: Unexpected token s
    at Object.parse (native)
    at /Users/xx/xx/xx/node_modules/git-rev/index.js:25:17
    at /Users/xx/xx/xx/node_modules/git-rev/index.js:5:5
    at ChildProcess.exithandler (child_process.js:646:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)```

backslash

Hi!
We have some commits with backslash in comments! cb(JSON.parse("["+ str +"]")) doesn't like these backslash....
Thank you

Offer synchronous methods

Build scripts are a main use case for this lib. Build scripts are often dumb and not optimized for async use.

Doesn't work on Windows

Either that or I'm doing something wrong. No API is called with data in the functional parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.