This commit enables checking if a change in a feature ref can be merged into
the target ref. Significantly, this API returns true if the policy can be met
when the merge is performed by an authorized person.
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
Also addresses some required changes to tests hitting GetMergeTree via older
Git versions. This is because we use checkout to compute merge tree in those
cases, and we need to ensure that in the test, the worktree modified is that of
the temporary repository rather than the gittuf repository itself.
Signed-off-by: Aditya Sirish A Yelgundhalli <ayelgundhall@bloomberg.net>
Co-authored-by: Pat Zielinski <70954403+patzielinski@users.noreply.github.com>
This removes the sub-go.mod in favor of updating all references to the
third_party/go-git package.
This lets users `go install` from outside of the module.
Signed-off-by: Billy Lynch <billy@chainguard.dev>
Now, the remote tracker is always updated. If gitinterface.Fetch is used
with a refName, it assumes the default is to fetch to the same target in
the local repository. By default, it also updates the remote tracker.
For more granular control, FetchRefSpec must be used.
Signed-off-by: Aditya Sirish <aditya@saky.in>
This commit includes several plumbing changes.
* Support for trees and blobs in gitinterface
* Initialization of refs/gittuf independent of policy / RSL packages
* Initialization of policy and policy-staging namespaces
* rsl.InitializeNamespace is now only responsible for its own namespace
* Replaces some t.Error calls with t.Fatal
Signed-off-by: Aditya Sirish <aditya@saky.in>