mirror of
https://github.com/vee1e/gittuf.git
synced 2026-09-02 18:57:10 +00:00
Worktree resolution chopped ".git" off the resolved GIT_DIR path, which only works for the standard <repo>/.git layout. This breaks repositories created with --separate-git-dir, misclassifies linked worktrees as bare (so file restoration was silently skipped), and misclassifies bare repositories named foo.git as non-bare. Linked worktrees could not even be loaded because ensureNoCompatObjectFormat expects a config file that only exists in the repository's common Git directory. - add Repository.GetWorktree() resolving via $GIT_DIR/gitdir, core.worktree, load-time discovery, then the standard layout; validated so stale or malformed records fall through cleanly - determine bareness via rev-parse --is-bare-repository instead of the GIT_DIR name, exposed through the ErrNoWorktree sentinel - read configuration from the common directory via $GIT_DIR/commondir - route Status(), RestoreWorktree(), and post-propagation restore through GetWorktree() Fixes #1006 Signed-off-by: lakshit verma <vermalucky2004@gmail.com> |
||
|---|---|---|
| .. | ||
| blob.go | ||
| blob_test.go | ||
| changes.go | ||
| changes_test.go | ||
| commit.go | ||
| commit_test.go | ||
| common.go | ||
| common_test.go | ||
| config.go | ||
| config_test.go | ||
| hash.go | ||
| hash_test.go | ||
| log.go | ||
| log_test.go | ||
| object.go | ||
| object_test.go | ||
| README.md | ||
| references.go | ||
| references_test.go | ||
| remote.go | ||
| remote_test.go | ||
| replace_ref_test.go | ||
| repository.go | ||
| repository_test.go | ||
| signature.go | ||
| signature_test.go | ||
| status.go | ||
| status_test.go | ||
| sync.go | ||
| sync_test.go | ||
| tag.go | ||
| tag_test.go | ||
| tree.go | ||
| tree_test.go | ||
| utils.go | ||
| utils_test.go | ||
| worktree_test.go | ||
gittuf's gitinterface Package
gittuf's gitinterface package is a lightweight Go API for interacting with Git
repositories. It is similar to go-git in
its goal, but differs as, unlike go-git, gitinterface uses the Git binary
for its operations.
To operate correctly, gitinterface requires a Git binary version of 2.34 or
higher.