MCPcopy Create free account
hub / github.com/cli/cli / LastCommit

Method LastCommit

pkg/cmd/browse/browse.go:375–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

373}
374
375func (gc *remoteGitClient) LastCommit() (*git.Commit, error) {
376 httpClient, err := gc.httpClient()
377 if err != nil {
378 return nil, err
379 }
380 repo, err := gc.repo()
381 if err != nil {
382 return nil, err
383 }
384 commit, err := api.LastCommit(api.NewClientFromHTTP(httpClient), repo)
385 if err != nil {
386 return nil, err
387 }
388 return &git.Commit{Sha: commit.OID}, nil
389}

Callers

nothing calls this directly

Calls 2

LastCommitFunction · 0.92
NewClientFromHTTPFunction · 0.92

Tested by

no test coverage detected