use the global *transfer.Manifest setup in commands.Run()
This commit is contained in:
parent
6a8e9d3f8e
commit
d3c57fc51b
@ -11,7 +11,6 @@ import (
|
||||
"github.com/github/git-lfs/git"
|
||||
"github.com/github/git-lfs/lfs"
|
||||
"github.com/github/git-lfs/progress"
|
||||
"github.com/github/git-lfs/transfer"
|
||||
"github.com/rubyist/tracerx"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@ -166,8 +165,6 @@ func checkoutWithChan(in <-chan *lfs.WrappedPointer) {
|
||||
|
||||
// As files come in, write them to the wd and update the index
|
||||
|
||||
manifest := transfer.ConfigureManifest(transfer.NewManifest(), cfg)
|
||||
|
||||
for pointer := range in {
|
||||
|
||||
// Check the content - either missing or still this pointer (not exist is ok)
|
||||
@ -190,7 +187,7 @@ func checkoutWithChan(in <-chan *lfs.WrappedPointer) {
|
||||
repopathchan <- pointer.Name
|
||||
cwdfilepath := <-cwdpathchan
|
||||
|
||||
err = lfs.PointerSmudgeToFile(cwdfilepath, pointer.Pointer, false, manifest, nil)
|
||||
err = lfs.PointerSmudgeToFile(cwdfilepath, pointer.Pointer, false, transfermanifest, nil)
|
||||
if err != nil {
|
||||
if errutil.IsDownloadDeclinedError(err) {
|
||||
// acceptable error, data not local (fetch not run or include/exclude)
|
||||
|
@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/github/git-lfs/errutil"
|
||||
"github.com/github/git-lfs/lfs"
|
||||
"github.com/github/git-lfs/transfer"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@ -64,8 +63,7 @@ func smudgeCommand(cmd *cobra.Command, args []string) {
|
||||
download = false
|
||||
}
|
||||
|
||||
manifest := transfer.ConfigureManifest(transfer.NewManifest(), cfg)
|
||||
err = ptr.Smudge(os.Stdout, filename, download, manifest, cb)
|
||||
err = ptr.Smudge(os.Stdout, filename, download, transfermanifest, cb)
|
||||
if file != nil {
|
||||
file.Close()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user