Update things from master
This commit is contained in:
parent
2a8b026c34
commit
f951e3ed77
@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/github/git-lfs/pointer"
|
"github.com/github/git-lfs/lfs"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@ -51,10 +51,10 @@ func pointerCommand(cmd *cobra.Command, args []string) {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr := pointer.NewPointer(hex.EncodeToString(oidHash.Sum(nil)), size)
|
ptr := lfs.NewPointer(hex.EncodeToString(oidHash.Sum(nil)), size)
|
||||||
fmt.Printf("Git LFS pointer for %s\n\n", pointerFile)
|
fmt.Printf("Git LFS pointer for %s\n\n", pointerFile)
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
pointer.Encode(io.MultiWriter(os.Stdout, buf), ptr)
|
lfs.EncodePointer(io.MultiWriter(os.Stdout, buf), ptr)
|
||||||
|
|
||||||
if comparing {
|
if comparing {
|
||||||
buildOid = gitHashObject(buf.Bytes())
|
buildOid = gitHashObject(buf.Bytes())
|
||||||
@ -74,7 +74,7 @@ func pointerCommand(cmd *cobra.Command, args []string) {
|
|||||||
|
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
tee := io.TeeReader(compFile, buf)
|
tee := io.TeeReader(compFile, buf)
|
||||||
_, err = pointer.Decode(tee)
|
_, err = lfs.DecodePointer(tee)
|
||||||
compFile.Close()
|
compFile.Close()
|
||||||
|
|
||||||
pointerName := "STDIN"
|
pointerName := "STDIN"
|
||||||
|
Loading…
Reference in New Issue
Block a user