···
contents, err := gr.RawContent(treePath)
x.Logger.Error("file content", "error", err.Error(), "treePath", treePath)
···
isBinary := !isTextual(mimeType)
content = base64.StdEncoding.EncodeToString(contents)
···
response := tangled.RepoBlob_Output{
-
Size: &[]int64{int64(len(contents))}[0],
···
+
// first check if this path is a submodule
+
submodule, err := gr.Submodule(treePath)
+
// this is okay, continue and try to treat it as a regular file
+
response := tangled.RepoBlob_Output{
+
Submodule: &tangled.RepoBlob_Submodule{
+
Branch: &submodule.Branch,
contents, err := gr.RawContent(treePath)
x.Logger.Error("file content", "error", err.Error(), "treePath", treePath)
···
isBinary := !isTextual(mimeType)
+
size := int64(len(contents))
content = base64.StdEncoding.EncodeToString(contents)
···
response := tangled.RepoBlob_Output{