diff --git a/services/convert/repository.go b/services/convert/repository.go
index fcd0824e45..35becd96d0 100644
--- a/services/convert/repository.go
+++ b/services/convert/repository.go
@@ -237,6 +237,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
 		MirrorInterval:                mirrorInterval,
 		MirrorUpdated:                 mirrorUpdated,
 		RepoTransfer:                  transfer,
+		ObjectFormatName:              repo.ObjectFormatName,
 	}
 }
 
diff --git a/tests/integration/api_repo_test.go b/tests/integration/api_repo_test.go
index 8ae2622976..2fb89cfa6e 100644
--- a/tests/integration/api_repo_test.go
+++ b/tests/integration/api_repo_test.go
@@ -701,3 +701,14 @@ func TestAPIRepoGetAssignees(t *testing.T) {
 	DecodeJSON(t, resp, &assignees)
 	assert.Len(t, assignees, 1)
 }
+
+func TestAPIViewRepoObjectFormat(t *testing.T) {
+	defer tests.PrepareTestEnv(t)()
+
+	var repo api.Repository
+
+	req := NewRequest(t, "GET", "/api/v1/repos/user2/repo1")
+	resp := MakeRequest(t, req, http.StatusOK)
+	DecodeJSON(t, resp, &repo)
+	assert.EqualValues(t, "sha1", repo.ObjectFormatName)
+}