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

Provide an API / option to get shortened commit #799

Closed
blueyed opened this issue Jun 1, 2016 · 2 comments
Closed

Provide an API / option to get shortened commit #799

blueyed opened this issue Jun 1, 2016 · 2 comments

Comments

@blueyed
Copy link
Contributor

blueyed commented Jun 1, 2016

It would be nice if fugitive could use abbreviated commit hashes by default and/or allow to get it through buffer_commit.

@tpope
Copy link
Owner

tpope commented Jun 2, 2016

You mean something like buffer.commit()[0:6]? I'm not sure I see a need to complicate the API just for that.

@tpope
Copy link
Owner

tpope commented Aug 17, 2019

The new way to get this would be something like matchstr(FugitiveParse()[0], '^\x\{7\}'). I don't think I'll be providing a dedicated API for this. Using shortened hashes by default means more rev-parse calls when we need to get the full hash back, not an acceptable tradeoff in my book.

@tpope tpope closed this as completed Aug 17, 2019
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