Skip to content

Conversation

@rosecodym
Copy link
Contributor

@rosecodym rosecodym commented Feb 7, 2025

Description:

I'm experimenting with ways to manipulate the git log that's being used to generate diffs (specifically, limiting its depth in come cases). Tweaking RepoPath for this locally isn't a huge deal but making the log command extensible seems like it could generally be useful, so I figured I'd do it.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@rosecodym rosecodym requested review from a team as code owners February 7, 2025 22:54
@zricethezav
Copy link
Contributor

@rgmz caught a gotcha with user defined git log options: gitleaks/gitleaks#1153. We might want to introduce something similar here if we think users are gonna go wild with it

@rosecodym
Copy link
Contributor Author

rosecodym commented Feb 10, 2025

@rgmz caught a gotcha with user defined git log options: gitleaks/gitleaks#1153. We might want to introduce something similar here if we think users are gonna go wild with it

If I'm reading that right, we already separate our logs opts into separate argument to exec.Command, but that's a really good thing to know!

@rosecodym
Copy link
Contributor Author

Oh, I but I should ensure that additionalArgs are appended before the -- option, if it exists.

@rosecodym rosecodym marked this pull request as draft February 12, 2025 14:05
@rosecodym rosecodym marked this pull request as ready for review February 13, 2025 16:21
@rosecodym rosecodym merged commit c0e66ca into main Feb 13, 2025
13 checks passed
@rosecodym rosecodym deleted the addl-log-args branch February 13, 2025 20:55
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

Successfully merging this pull request may close these issues.

4 participants