Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

git --no-pager log -1 pretty=format my_file #612

Closed
posito opened this issue Oct 5, 2017 · 3 comments
Closed

git --no-pager log -1 pretty=format my_file #612

posito opened this issue Oct 5, 2017 · 3 comments

Comments

@posito
Copy link

posito commented Oct 5, 2017

Hello,

I am trying to find the way to get the last commit on a file. I am doing it this way today...

exec.Command("git","--no-pager", "log", "-1", `--pretty=format:"%ad"`, file).Output()

Is there a better way ?

@posito
Copy link
Author

posito commented Oct 7, 2017

@mcuadros any pointers ? git-blame doesn't work becuase i need to get the latest change

@mcuadros
Copy link
Contributor

This functionality is not implemented, you will need to all the commits to find witch tree makes references to it, I suggest read the original implementation at cgit.

@mcuadros
Copy link
Contributor

Duplicate #562

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

No branches or pull requests

2 participants