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

[feature request] git blame #686

Open
samuela opened this issue Oct 18, 2021 · 4 comments
Open

[feature request] git blame #686

samuela opened this issue Oct 18, 2021 · 4 comments

Comments

@samuela
Copy link

samuela commented Oct 18, 2021

It would be great to have git blame functionality!

@Pandapip1
Copy link

It's been >1 year. Are there any plans to implement this?

@vitch
Copy link

vitch commented Jan 15, 2025

I'd also be interested in this.

Is there a philosophical objection to adding it or is it just a question of time? I'm not familiar with the code of simple-git but I just had a quick look and I guess it would be a case of adding a new task. Is that right? Would you be open to a PR implementing it?

@vitch
Copy link

vitch commented Jan 15, 2025

Although I just looked into it and it seems you can do:

let blameResponse = await this.git.raw(['blame', path]);

Which is maybe good enough?

@steveukx
Copy link
Owner

Hello, you're quite right... it just comes down to time to dedicate to the project.

If you'd like to create a task - use https://github.com/steveukx/git-js/blob/main/simple-git/src/lib/tasks/count-objects.ts as an example of how the tasks are created, the types are set up and added to the main simple-git prototype.

The response parsing generally runs line by line, parse-pull.ts is an example of complex response parsing using multiple line parsers.

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

4 participants