lfs.Scan() => lfs.ScanRefs()
This commit is contained in:
parent
83c19bca45
commit
6f549a3a11
@ -27,7 +27,7 @@ func lsFilesCommand(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pointers, err := lfs.Scan(ref, "")
|
pointers, err := lfs.ScanRefs(ref, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Panic(err, "Could not scan for Git LFS files")
|
Panic(err, "Could not scan for Git LFS files")
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ func pushCommand(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Just use scanner here
|
// Just use scanner here
|
||||||
pointers, err := lfs.Scan(left, right)
|
pointers, err := lfs.ScanRefs(left, right)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Panic(err, "Error scanning for Git LFS files")
|
Panic(err, "Error scanning for Git LFS files")
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ func statusCommand(cmd *cobra.Command, args []string) {
|
|||||||
remoteRef, err := git.CurrentRemoteRef()
|
remoteRef, err := git.CurrentRemoteRef()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
||||||
pointers, err := lfs.Scan(ref, "^"+remoteRef)
|
pointers, err := lfs.ScanRefs(ref, "^"+remoteRef)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Panic(err, "Could not scan for Git LFS objects")
|
Panic(err, "Could not scan for Git LFS objects")
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ func prePushCommand(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Just use scanner here
|
// Just use scanner here
|
||||||
pointers, err := lfs.Scan(left, right)
|
pointers, err := lfs.ScanRefs(left, right)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Panic(err, "Error scanning for Git LFS files")
|
Panic(err, "Error scanning for Git LFS files")
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,9 @@ type indexFile struct {
|
|||||||
|
|
||||||
var z40 = regexp.MustCompile(`\^?0{40}`)
|
var z40 = regexp.MustCompile(`\^?0{40}`)
|
||||||
|
|
||||||
// Scan takes a ref and returns a slice of wrappedPointer objects
|
// ScanRefs takes a ref and returns a slice of wrappedPointer objects
|
||||||
// for all Git LFS pointers it finds for that ref.
|
// for all Git LFS pointers it finds for that ref.
|
||||||
func Scan(refLeft, refRight string) ([]*wrappedPointer, error) {
|
func ScanRefs(refLeft, refRight string) ([]*wrappedPointer, error) {
|
||||||
nameMap := make(map[string]string, 0)
|
nameMap := make(map[string]string, 0)
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user