1. When `git archive` errors, do not require an exit code, but just use
the `ExitStatus` we already have. This requires less unwrapping.
Also, the previous default of 0 was misleading, since 0 is returned
upon successful termination.
2. Use "refname" instead of "refspec" as these are different concepts.
Refer to <https://git-scm.com/docs/git-check-ref-format> and in
particular
<https://git-scm.com/docs/git-check-ref-format#Documentation/git-check-ref-format.txt---refspec-pattern>.
3. Only allow appending ".tar.gz" to commit IDs, not to refnames,
because refnames may contain the suffix ".tar.gz". It might look
weird, but it is not forbidden to do `git branch foo.tar.gz`.
4. `char::is_ascii` does not help sanitize refnames to file names. In
particular we have `'/'.is_ascii() == true`. Replace forward slashes
with two underscores.
Instead of panicking when trying to handle non utf8 lines we should
return `null` as line output.
This way we can on the frontend detect if a file has any lines the api
wasn't able to parse and fallback to show a file as a `Binary File`
Turns out "content-type: text; charset=utf-8" wasn't valid, it had to be
"content-type: text/plain; charset=utf-8" for browsers to recognise it
properly.
The usage of the term `delegate` when handling a DID isn't explicit
enough, so this commit changes the places where the word `delegate` is
used when actually it's a DID.
Don't require a repo to have a `xyz.radicle.project` payload.
If there are issues with obtaining the repo `head`, issue count or patch
count, filter that repo from the list.
This allows us to avoid querying the repo stats and relying on maybe bad
routing tables and take the hardcoded pinned repo array in case of
querying for pinned repos.
We also remove the `/api/v1/profile` endpoint because that was only
supposed to be used with a local node and not publicly accessible. All
fields that are still used in the UI were moved to `/api/v1/node`.
We bump the API and crate versions since this is a breaking change.
squash or drop!: Small suggestion for improvement
Previously the /api/v1/stats endpoint would count any repository that is
in the storage regardless of whether the repository is publicly seeded or not.
Usually going with Darwin -> aarch64 and the rest fallback to amd64
isn't a bad choice, but I think we can do better by checking `arch` so a
device like a Raspberry which has an ARM CPU is able to run the build
script.