Skip to content

API /repos/{owner}/{repo}/git/trees/ doesn't report Path correctly in recursive mode #35959

@wienans

Description

@wienans

Description

Hallo Guys,

i updated from 1.24 to 1.25.1 and noticed that the API Response for

/repos/{owner}/{repo}/git/trees/ doesn't report Path correctly

{
      "path": "src/gcc/Cron",
      "mode": "040000",
      "type": "tree",
      "size": 0,
      "sha": "cecf2c59af0966d5be1b4f05608242e6d7128c34",
      "url": "http://git.miltronik.local/api/v1/repos/Miltronik-Middleware/Cron/git/trees/cecf2c59af0966d5be1b4f05608242e6d7128c34"
    },

to

{
      "path": "Cron",
      "mode": "040000",
      "type": "tree",
      "size": 0,
      "sha": "cecf2c59af0966d5be1b4f05608242e6d7128c34",
      "url": "http://git.miltronik.local/api/v1/repos/Miltronik-Middleware/Cron/git/trees/cecf2c59af0966d5be1b4f05608242e6d7128c34"
    },

and similar for files

I only noticed because a tool of mine which uses the fact that the full path is set didn't work anymore.

I would assume with the name "path" the old one is correct, or was there a delibarate change? I didn't find anything in the changelog.

The gitea.com version looks to be fine. Might that be something in the windows build?

Gitea Version

1.25.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2:42

Operating System

Windows

How are you running Gitea?

self hosted on Windows machine

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions