Skip to content
New issue

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

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

Already on GitHub? # to your account

🚀 Configurable timestamp output format in git blame #1157

Closed
mliszcz opened this issue Aug 11, 2022 · 3 comments · Fixed by #1158
Closed

🚀 Configurable timestamp output format in git blame #1157

mliszcz opened this issue Aug 11, 2022 · 3 comments · Fixed by #1158

Comments

@mliszcz
Copy link
Contributor

mliszcz commented Aug 11, 2022

In git blame I noticed this:
image

It would be helpful to know e.g. which change was applied first but this can not be figured out from the humanized timestamp.

chrono_humanize::HumanTime::from(blame.time).to_string(),

I changed it locally to: blame.time.format("%H:%M %Y-%m-%d").to_string(),.

Would it be possible to make this configurable? Perhaps a new option --blame-output-timestamp-format could be added. If present (and not empty) it would be used as a format string. If not, we will fall back to HumanTime formatting. What do you think?

I can work on a PR if this could be accepted.

@dandavison
Copy link
Owner

Hi @mliszcz, thanks! I agree with the feature proposal and I think that your proposed API is spot-on. Please do go ahead and make a PR if you have time, and let me know if anything's unclear about the development workflow.

mliszcz added a commit to mliszcz/delta that referenced this issue Aug 11, 2022
New CLI/config option is introduced: blame-timestamp-output-format.

Fixes dandavison#1157.
@mliszcz
Copy link
Contributor Author

mliszcz commented Aug 11, 2022

Thanks. I've just opened a PR. Please review carefully because I'm doing rust for the first time! I guess the formatter job will most likely fail, I will run that tomorrow and eventually amend the commit.

mliszcz added a commit to mliszcz/delta that referenced this issue Aug 12, 2022
New CLI/config option is introduced: blame-timestamp-output-format.

Fixes dandavison#1157.
@mliszcz
Copy link
Contributor Author

mliszcz commented Aug 12, 2022

Ready. @dandavison please have a look and trigger the pipeline when you find some time.

mliszcz added a commit to mliszcz/delta that referenced this issue Aug 12, 2022
New CLI/config option is introduced: blame-timestamp-output-format.

Fixes dandavison#1157.
dandavison pushed a commit that referenced this issue Aug 16, 2022
New CLI/config option is introduced: blame-timestamp-output-format.

Fixes #1157.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants