Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git/localrepo/commit.go')
-rw-r--r--internal/git/localrepo/commit.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/git/localrepo/commit.go b/internal/git/localrepo/commit.go
index df5effc2a..2f77069ef 100644
--- a/internal/git/localrepo/commit.go
+++ b/internal/git/localrepo/commit.go
@@ -68,7 +68,10 @@ func (repo *Repo) ReadCommit(ctx context.Context, revision git.Revision, opts ..
if cfg.withTrailers {
commit, err = catfile.GetCommitWithTrailers(ctx, repo.gitCmdFactory, repo, objectReader, revision)
} else {
- commit, err = catfile.GetCommit(ctx, objectReader, revision)
+ var c *catfile.Commit
+ if c, err = catfile.GetCommit(ctx, objectReader, revision); err == nil {
+ commit = c.GitCommit
+ }
}
if err != nil {