mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-04 11:30:14 -05:00
Allow Dataset HEAD to be set to non-fastforward commits (#2271)
The Dataset.Commit() code pathway still enforces fast-forward-only behavior, but a new SetHead() method allows the HEAD of a Dataset to be forced to any other Commit. noms sync detects the case where the source Commit is not a descendent of the provided sink Dataset's HEAD and uses the new API to force the sink to the desired new Commit, printing out the now-abandoned old HEAD. Fixes #2240
This commit is contained in:
+1
-1
@@ -122,6 +122,6 @@ func IsCommitType(t *types.Type) bool {
|
||||
return types.IsSubtype(valueCommitType, t)
|
||||
}
|
||||
|
||||
func isRefOfCommitType(t *types.Type) bool {
|
||||
func IsRefOfCommitType(t *types.Type) bool {
|
||||
return t.Kind() == types.RefKind && IsCommitType(getRefElementType(t))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user