-
Notifications
You must be signed in to change notification settings - Fork 126
Don't abort on git.Blame errors #968
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
Conversation
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
300b76e to
817f6b1
Compare
internal/function/blame.go
Outdated
| result, err := git.Blame(g.commit, g.curFile.Name) | ||
| if err != nil { | ||
| return err | ||
| msg := fmt.Sprintf("Error in BLAME for file %s: %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of one of the parameters is in a newline, then better put each in a new line:
msg := fmt.Sprintf(
"Error in BLAME for file %s: %s",
g.curFile.Name,
err.Error(),
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
internal/function/blame.go
Outdated
| } | ||
|
|
||
| bg, err := NewBlameGenerator(commit, fIter) | ||
| bg, err := NewBlameGenerator(commit, fIter, ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context is by convention always the first parameter if a function takes a context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks, learnt something new.
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
7f18b6b to
9ff7004
Compare
Fixes #966
Signed-off-by: Juanjo Alvarez juanjo@sourced.tech
make upgradecommand if applicable.