mirror of
https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo.git
synced 2025-06-26 05:00:03 +02:00
git-annex: create modules/annex
This moves the `annexObjectPath()` helper out of the tests and into a dedicated sub-package as `annex.ContentLocation()`, and expands it with `.Pointer()` (which validates using `git annex examinekey`), `.IsAnnexed()` and `.Content()` to make it a more useful module. The tests retain their own wrapper version of `ContentLocation()` because I tried to follow close to the API modules/lfs uses, which in terms of abstract `git.Blob` and `git.TreeEntry` objects, not in terms of `repoPath string`s which are more convenient for the tests.
This commit is contained in:
parent
b51c2bb4f7
commit
aa806493b0
6 changed files with 185 additions and 19 deletions
|
@ -89,6 +89,7 @@ func (te *TreeEntry) Blob() *Blob {
|
|||
|
||||
return &Blob{
|
||||
ID: ParseGogitHash(te.gogitTreeEntry.Hash),
|
||||
repo: te.ptree.repo,
|
||||
gogitEncodedObj: encodedObj,
|
||||
name: te.Name(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue