Conversation
BREAKING CHANGE: Use git commands directly instead of relying of go-git. This should allow for more compatibility with shallow clones.
There was a problem hiding this comment.
Caution
Changes requested ❌
Reviewed everything up to 37739bf in 2 minutes and 22 seconds. Click for details.
- Reviewed
1662lines of code in28files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. branch_diff_commits.go:29
- Draft comment:
Consider logging parsing errors when converting each commit hash (using NewHash) instead of silently skipping invalid lines. This can aid in debugging unexpected git output. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. commits_between.go:46
- Draft comment:
The error handling for the merge-base command is unclear. Returning an empty slice when the merge-base check fails may hide underlying errors. Consider clarifying or documenting the intended behavior. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
3. previous_tag.go:30
- Draft comment:
The logic in PreviousTag returns the newest tag if the current commit is not tagged. This behavior may be non-intuitive; consider adding documentation to explain the rationale behind returning tags[0] when the current commit lacks an attached tag. - Reason this comment was not posted:
Confidence changes required:50%<= threshold50%None
4. test_helpers.go:25
- Draft comment:
Consider checking and handling errors from the git config commands (setting user.name and user.email) to ensure the test repository is properly configured. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. branch_diff_commits.go:8
- Draft comment:
Typo: The sentence "returns of a diff of them" appears to be grammatically incorrect. Consider changing it to "returns a diff of them." - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_ff4w8up0GxZwLQc8
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
|
|
||
| // Get commit message - use %B to get full body, then normalize | ||
| // go-git's Message field returns the raw commit message which always ends with \n | ||
| fullMessage, err := g.runGitCommand("log", "-1", "--format=%B", hashStr) |
There was a problem hiding this comment.
Multiple separate git log calls are used to retrieve the commit message, author, and committer details. Consider consolidating these calls into a single command to reduce overhead and improve performance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: Use git commands directly instead of relying of go-git. This should allow for more compatibility with shallow clones.
Important
Replace
go-gitwith directgitcommand usage for improved compatibility with shallow clones, affecting branch and commit operations.go-gitwith directgitcommand usage for branch and commit operations inbranch_diff_commits.go,commit.go, andget_tags.go.gitcommands directly.BranchDiffCommits,Commit,CommitsBetween,CommitsOnBranch,CurrentBranch,CurrentCommit,CurrentTag,LatestCommitOnBranch, andPreviousTagto usegitcommands.runGitCommandinopen_git.goto executegitcommands.branch_diff_commits_test.go,commit_test.go,commits_between_test.go,commits_on_branch_test.go,current_branch_test.go,current_commit_test.go,current_tag_test.go,latest_commit_on_branch_test.go, andprevious_tag_test.goto reflect changes.go-gitdependencies fromgo.modandgo.sum.This description was created by
for 37739bf. You can customize this summary. It will automatically update as commits are pushed.