~sircmpwn/git.sr.ht

Fix typo in prior patch
f23cf499 — Eli Schwartz 7 days ago 0.88.7
Produce stable *.patch file downloads

There are two sources of instability with this endpoint:

- the version number for git itself is added by default as a trailer,
  and changes on a frequent basis whenever the server upgrades git

- the "index xxxxxxx..xxxxxxx 10064" line in the diff header contains a
  reference to git blobs, and by default git blobs are abbreviated as
  much as possible in order to produce a "short and succinct"
  description, but the cutoff changes over time as the repo gets larger

Fix both of these issues, by passing the relevant options whenever
running `git format-patch`. Although passing `--full-index` for the
latter case might ordinarily be considered a breaking change, the
checksum of the patch file contents was always completely unreliable due
to the former case, so this is our chance to get it correct for all
time.

Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Add git.sr.ht-http-clone to intercept git http-backend explicitly and provide redirections

$ git clone http://192.168.1.63:8001/~nabijaczleweli/public2
Cloning into 'public2'...
fatal: remote error:

NOTICE: This repository has moved.
Please update your remote to:

        http://192.168.1.63:8001/~nabijaczleweli/public-renamed

$

The message mimicks git.sr.ht-shell's.

Repository being PRIVATE is equivalent to not existing,
redirects have visibility of target repositories.

This replaces the /authorize end-point.
blueprints/email.py: Clear out any stale commentary from session

I experienced the bug myself yesterday; see
   https://lists.sr.ht/~rjarry/aerc-devel/patches/57993
that has a commentary carried over from
   https://lists.sr.ht/~rjarry/aerc-devel/patches/57919

I have not been able to validate this locally and I'm not too keen on
setting up a full SourceHut instance to do so; I'll be happy to test it
in case there's a test instance available where this patch can be
integrated.

Fixes: https://todo.sr.ht/~sircmpwn/git.sr.ht/372
Signed-off-by: Simon Martin <simon@nasilyan.com>
Signed-off-by: Drew DeVault <drew@ddevault.org>
Replace all occurences of pygit2 Commit.oid with Commit.id

Pygit has moved away from oid to id in Commit type,
oid field has been deprecated (and then removed)
in favor of id.

This means that with newer pygit2 it's impossible
to do some actions in the git.sr.ht instance.

There has already been some work put into
this that changed this in one place,
but this changes it everywhere.

Note that the Pygit2.Oid no longer has
oid nor id fields. But I don't think these
are used anywhere in the codebase, only
Commit.oid has been used, so it's fine.
shell: return "Access denied." for redirects to private repositories the pusher can't access

Fixes: ~sircmpwn/git.sr.ht#380
Upgrade core-go and gqlgen
Use permalinks in .commit-info template section

Change the URL for the commit link when browsing a file, blame, or tree
to go to the commit itself, rather than the head of the branch. This
makes it a more useful permalink.

Implementation copied from the `gitsrht.rss.commit_url` function.

Signed-off-by: Noelle Leigh <noelle_leigh@fastmail.com>
7cdc6233 — Drew DeVault a month ago
git.sr.ht-periodic: address minio breaking change

minio changed the API for remove_objects to use this indirection via
DeleteObject.
Makefile: make SHAREDIR consistent with core.sr.ht

The SHAREDIR variable has slightly different semantics in core.sr.ht vs
in all the services. The services will be converted to the same
semantics as core.sr.ht.
53e1231d — Drew DeVault a month ago
web: remove unnecessary print statement
cbf96729 — Drew DeVault a month ago
git.sr.ht-initdb: drop obsolete script
9c128b21 — Drew DeVault a month ago 0.88.2
web: retain visibility on validation errors during repo create
Fix service name in config reference
types: drop SSHKey implementation

It is no longer used. All key handling is happening in meta.sr.ht.
Stop using scmsrht.BaseScmOAuthService

Currently, both the git.sr.ht and hg.sr.ht OAuth implementation is based
on `scmsrht.BaseScmOAuthService`. The main value that class provides is
handling of SSH keys in a DB table for that service (including webhooks
to update them). However, this is exactly what we want to get rid of.
In fact this table is already never read - all SSH key reads already go
through meta.sr.ht.

Since this was the main feature of this base class, simply stop using it
and base the service on `srht.oauth.AbstractOAuthService`, like all
non-SCM-services do. Once the same has been done for hg.sr.ht, the code
in scm.sr.ht can be dropped.

Note that this commit will cause the (still active on meta.sr.ht) SSH
key update webhooks to 404. This was deemed acceptable. If so desired,
the hooks can be cleaned out of the database by running the following
query against meta.sr.ht:

    DELETE FROM user_webhook_subscription
    WHERE url = 'https://git.sr.ht/webhook/notify/keys'
24e1a931 — Drew DeVault 2 months ago
Set rel=nofollow on link trap
e3e9c07b — Drew DeVault 2 months ago 0.87.2
Tweak tarpit link
44547cbf — Drew DeVault 2 months ago 0.87.1
Add invisible link to honeypot to all repo pages
Next
Do not follow this link