mirror of
https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo.git
synced 2025-06-25 20:00:02 +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
|
@ -15,6 +15,10 @@ import (
|
|||
|
||||
// This file contains common functions between the gogit and !gogit variants for git Blobs
|
||||
|
||||
func (b *Blob) Repo() *Repository {
|
||||
return b.repo
|
||||
}
|
||||
|
||||
// Name returns name of the tree entry this blob object was created from (or empty string)
|
||||
func (b *Blob) Name() string {
|
||||
return b.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue