[PR #3786] [CLOSED] WIP Added git-annex-shell support to the serv command #17083

Closed
opened 2025-11-02 12:25:54 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3786
Author: @tf198
Created: 4/12/2018
Status: Closed

Base: masterHead: git_annex_support


📝 Commits (7)

  • 386b282 Added git-annex-shell support to the serv command
  • 93c1930 Fixing introduced but with leading slash
  • aa4ba27 Fixed repo path bug and added tests
  • 8ec2e92 Added note about shlex
  • af17131 Merge branch 'master' into git_annex_support
  • d359d1f Fixed bug with removal of annex objects on delete
  • 441ce00 Merge branch 'git_annex_support' of github.com:tf198/gitea into git_annex_support

📊 Changes

5 files changed (+178 additions, -41 deletions)

View changed files

📝 cmd/serv.go (+69 -40)
📝 integrations/git_test.go (+87 -0)
📝 integrations/mysql.ini.tmpl (+1 -0)
📝 models/repo.go (+13 -1)
📝 modules/setting/setting.go (+8 -0)

📄 Description

Adds the ability to use gitea as a git-annex bare remote as detailed at https://git-annex.branchable.com/bare_repositories/. The limitations are the same as for git-annex generally - only available over ssh, not https. Ref #525

Installing

  • install git-annex on your server
  • add GIT_ANNEX_ENABLED = true to your custom/conf/app.ini

Usage

git clone git@myserver:bob/myrepo
cd myrepo
git annex init `hostname`
dd if=/dev/urandom of=test_1.dat bs=1M count=1
git annex add test_1.dat
git annex sync
git annex copy --to origin test_1.dat

Implemented in a similar fashion to the existing LFS code, though I did have to refactor the way commands are handled to be more generic.

There is a second branch at https://github.com/tf198/gitea/tree/git_annex_view with a working implementation of viewing annexed files in the interface but involves far more changes and will need further review.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3786 **Author:** [@tf198](https://github.com/tf198) **Created:** 4/12/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `git_annex_support` --- ### 📝 Commits (7) - [`386b282`](https://github.com/go-gitea/gitea/commit/386b28250914fe66e21ccf9492ae841fca8fbc13) Added git-annex-shell support to the serv command - [`93c1930`](https://github.com/go-gitea/gitea/commit/93c1930957b65d2d8967f03d0c795615b8205486) Fixing introduced but with leading slash - [`aa4ba27`](https://github.com/go-gitea/gitea/commit/aa4ba27f7f577ed89f719886ddad07a77659d351) Fixed repo path bug and added tests - [`8ec2e92`](https://github.com/go-gitea/gitea/commit/8ec2e92f07a94d9a0b53829e5feb92589ac8618a) Added note about shlex - [`af17131`](https://github.com/go-gitea/gitea/commit/af171310f14b87335414848b0d612b4f70097996) Merge branch 'master' into git_annex_support - [`d359d1f`](https://github.com/go-gitea/gitea/commit/d359d1f565ad091eafe1bf06b12898f10161f8d3) Fixed bug with removal of annex objects on delete - [`441ce00`](https://github.com/go-gitea/gitea/commit/441ce00644b94c16ec584bfc38bda79584c2c20e) Merge branch 'git_annex_support' of github.com:tf198/gitea into git_annex_support ### 📊 Changes **5 files changed** (+178 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `cmd/serv.go` (+69 -40) 📝 `integrations/git_test.go` (+87 -0) 📝 `integrations/mysql.ini.tmpl` (+1 -0) 📝 `models/repo.go` (+13 -1) 📝 `modules/setting/setting.go` (+8 -0) </details> ### 📄 Description Adds the ability to use gitea as a **git-annex** bare remote as detailed at https://git-annex.branchable.com/bare_repositories/. The limitations are the same as for git-annex generally - only available over ssh, not https. Ref #525 Installing ----------- * install git-annex on your server * add `GIT_ANNEX_ENABLED = true` to your `custom/conf/app.ini` Usage -------- ``` git clone git@myserver:bob/myrepo cd myrepo git annex init `hostname` dd if=/dev/urandom of=test_1.dat bs=1M count=1 git annex add test_1.dat git annex sync git annex copy --to origin test_1.dat ``` Implemented in a similar fashion to the existing LFS code, though I did have to refactor the way commands are handled to be more generic. There is a second branch at https://github.com/tf198/gitea/tree/git_annex_view with a working implementation of viewing annexed files in the interface but involves far more changes and will need further review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:25:54 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17083