Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change length of the short hash #49

Open
evaliyev opened this issue Jan 22, 2020 · 1 comment
Open

Change length of the short hash #49

evaliyev opened this issue Jan 22, 2020 · 1 comment

Comments

@evaliyev
Copy link

The up-to-date version of git return 8 symbols of hash with --short flag.

git rev-parse --short HEAD => 7f2bf1a5

https://github.com/kurttheviking/git-rev-sync-js/blob/master/index.js#L118

@septs
Copy link

septs commented Feb 18, 2020

https://github.com/NiceLabs/git-rev

import git from "@nice-labs/git-rev";

git.commitHash(true) // arg0 is short flag
// output: 75bf4ee

// short: true equivalent form: git rev-parse --short HEAD
// short: false equivalent form: git rev-parse HEAD

Can come and use my brand new implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants