-
Notifications
You must be signed in to change notification settings - Fork 812
Add support for reading git notes #928
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
base: master
Are you sure you want to change the base?
Changes from all commits
8000
summary>
Commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3333,3 +3333,20 @@ func BenchmarkPlainClone(b *testing.B) { | |
clone(b) | ||
} | ||
} | ||
|
||
func (s *RepositorySuite) TestGetNoteNotExisting(c *C) { | ||
r, _ := Init(memory.NewStorage(), nil) | ||
err := r.clone(context.Background(), &CloneOptions{URL: s.GetBasicLocalRepositoryURL()}) | ||
c.Assert(err, IsNil) | ||
|
||
head, err := r.Head() | ||
c.Assert(err, IsNil) | ||
|
||
commit, err := r.CommitObject(head.Hash()) | ||
c.Assert(err, IsNil) | ||
|
||
note, err := r.GetNote(commit) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need a test case that also includes notes in. You can create a sample repository with 1-2 commits with some notes. Then you submit its pack as a PR to https://github.com/go-git/go-git-fixtures. That would enable you to refer to that pack via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we got your changes merged in the other repo, we just need to update the go-git-fixtures version to the latest. |
||
c.Assert(err, IsNil) | ||
|
||
c.Check(note, Equals, "") | ||
} |
Uh oh!
There was an error while loading. Please reload this page.