Debian Codegraph @

commands/command_pointer.go

raw symbols SCIP
1 package commandsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/
2
3 import (
4 "bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/"
5 "crypto/sha256scip-go gomod github.com/golang/go/src go1.25.0 `crypto/sha256`/"
6 "encoding/hexscip-go gomod github.com/golang/go/src go1.25.0 `encoding/hex`/"
7 "errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/"
8 "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/"
9 "ioscip-go gomod github.com/golang/go/src go1.25.0 io/"
10 "osscip-go gomod github.com/golang/go/src go1.25.0 os/"
11
12 "github.com/git-lfs/git-lfs/v3/gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/"
13 "github.com/git-lfs/git-lfs/v3/lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/"
14 "github.com/git-lfs/git-lfs/v3/trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/"
15 "github.com/spf13/cobrascip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/"
16 )
17
18 var (
19 pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile. string
20 pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare. string
21 pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. bool
22 pointerCheckscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCheck. bool
23 pointerStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStrict. bool
24 pointerNoStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoStrict. bool
25 pointerNoExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoExtensions. bool
26 )
27
28 func pointerCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCommand().(cmd *cobrascip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/.Commandscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#, args []string) {
29 var comparePointer *lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.Pointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/Pointer#
30 comparing := false
31 something := false
32 hasExtensionsConfig := false
33 buildOid := ""
34 compareOid := ""
35
36 if pointerCheckscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCheck. {
37 var r ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadCloserscip-go gomod github.com/golang/go/src go1.25.0 io/ReadCloser#
38 var err error
39
40 if pointerStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStrict. && pointerNoStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoStrict. {
41 ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Cannot combine --strict with --no-strict")))
42 }
43
44 if len(pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare.) > 0 {
45 ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Cannot combine --check with --pointer")))
46 }
47
48 if len(pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile.) > 0 {
49 if pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. {
50 ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("With --check, --file cannot be combined with --stdin")))
51 }
52 r, err = osscip-go gomod github.com/golang/go/src go1.25.0 os/.Openscip-go gomod github.com/golang/go/src go1.25.0 os/Open().(pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile.)
53 if err != nil {
54 ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(err)
55 }
56 } else if pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. {
57 r = ioscip-go gomod github.com/golang/go/src go1.25.0 io/.NopCloserscip-go gomod github.com/golang/go/src go1.25.0 io/NopCloser().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stdinscip-go gomod github.com/golang/go/src go1.25.0 os/Stdin.)
58 } else {
59 ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Must specify either --file or --stdin with --check")))
60 }
61
62 p, err := lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.DecodePointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DecodePointer().(r)
63 if err != nil {
64 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
65 }
66 if pointerStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStrict. && !p.Canonicalscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/Pointer#Canonical. {
67 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(2)
68 }
69 r.Closescip-go gomod github.com/golang/go/src go1.25.0 io/Closer#Close().()
70 return
71 }
72
73 if len(pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare.) > 0 || pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. {
74 comparing = true
75 }
76
77 if len(pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile.) > 0 {
78 something = true
79 buildFile, err := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Openscip-go gomod github.com/golang/go/src go1.25.0 os/Open().(pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile.)
80 if err != nil {
81 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
82 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
83 }
84
85 var ptr *lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.Pointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/Pointer#
86 if pointerNoExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoExtensions. || !cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..InReposcip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#InRepo().() {
87 oidHash := sha256scip-go gomod github.com/golang/go/src go1.25.0 `crypto/sha256`/.Newscip-go gomod github.com/golang/go/src go1.25.0 `crypto/sha256`/New().()
88 size, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Copyscip-go gomod github.com/golang/go/src go1.25.0 io/Copy().(oidHash, buildFile)
89 if err != nil {
90 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
91 buildFile.Closescip-go gomod github.com/golang/go/src go1.25.0 os/File#Close().()
92 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
93 }
94
95 ptr = lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.NewPointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/NewPointer().(hexscip-go gomod github.com/golang/go/src go1.25.0 `encoding/hex`/.EncodeToStringscip-go gomod github.com/golang/go/src go1.25.0 `encoding/hex`/EncodeToString().(oidHash.Sumscip-go gomod github.com/golang/go/src go1.25.0 hash/Hash#Sum().(nil)), size, nil)
96 } else {
97 gitfilter := lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.NewGitFilterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/NewGitFilter().(cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg.)
98 hasExtensionsConfig = len(cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..Extensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#Extensions().()) > 0
99 cleaned, err := gitfilter.Cleanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/GitFilter#Clean().(buildFile, pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile., -1, nil)
100 if err != nil {
101 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
102 buildFile.Closescip-go gomod github.com/golang/go/src go1.25.0 os/File#Close().()
103 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
104 }
105
106 ptr = cleaned.Pointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/cleanedAsset#Pointer.
107 }
108 buildFile.Closescip-go gomod github.com/golang/go/src go1.25.0 os/File#Close().()
109
110 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Git LFS pointer for %s", pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile.), "\n")
111 if !pointerNoExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoExtensions. && hasExtensionsConfig {
112 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("warning: Using LFS extensions, use --no-extensions for a plain pointer."), "\n")
113 }
114 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., "\n")
115
116 buf := &bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#{}
117 lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.EncodePointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/EncodePointer().(ioscip-go gomod github.com/golang/go/src go1.25.0 io/.MultiWriterscip-go gomod github.com/golang/go/src go1.25.0 io/MultiWriter().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stdoutscip-go gomod github.com/golang/go/src go1.25.0 os/Stdout., buf), ptr)
118
119 if comparing {
120 buildOid, err = gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.HashObjectscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/HashObject().(bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewReaderscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewReader().(buf.Bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#Bytes().()))
121 if err != nil {
122 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
123 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
124 }
125 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., "\n", trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Git blob OID: %s", buildOid), "\n\n")
126 }
127 } else {
128 comparing = false
129 }
130
131 if len(pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare.) > 0 || pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. {
132 something = true
133 compFile, err := pointerReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerReader().()
134 if err != nil {
135 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
136 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
137 }
138
139 buf := &bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#{}
140 tee := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.TeeReaderscip-go gomod github.com/golang/go/src go1.25.0 io/TeeReader().(compFile, buf)
141 comparePointer, err = lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.DecodePointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DecodePointer().(tee)
142 compFile.Closescip-go gomod github.com/golang/go/src go1.25.0 io/Closer#Close().()
143
144 pointerName := "STDIN"
145 if !pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. {
146 pointerName = pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare.
147 }
148 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Pointer from %s", pointerName), "\n\n")
149
150 if err != nil {
151 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
152 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
153 }
154
155 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., buf.Stringscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#String().())
156 if comparing {
157 compareOid, err = gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.HashObjectscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/HashObject().(bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/.NewReaderscip-go gomod github.com/golang/go/src go1.25.0 bytes/NewReader().(buf.Bytesscip-go gomod github.com/golang/go/src go1.25.0 bytes/Buffer#Bytes().()))
158 if err != nil {
159 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error())
160 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
161 }
162 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., "\n", trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Git blob OID: %s", compareOid), "\n")
163 }
164 }
165
166 if comparing && buildOid != compareOid {
167 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., "\n", trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Pointers do not match"), "\n")
168 if hasExtensionsConfig || len(comparePointer.Extensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/Pointer#Extensions.) > 0 {
169 fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprint().(osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stderrscip-go gomod github.com/golang/go/src go1.25.0 os/Stderr., trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("note: Mismatch may be due to differing LFS extensions."), "\n")
170 }
171 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
172 }
173
174 if !something {
175 Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("Nothing to do!"))
176 ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1)
177 }
178 }
179
180 func pointerReaderscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerReader().() (ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadCloserscip-go gomod github.com/golang/go/src go1.25.0 io/ReadCloser#, error) {
181 if len(pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare.) > 0 {
182 if pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin. {
183 return nil, errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("cannot read from STDIN and --pointer"))
184 }
185
186 return osscip-go gomod github.com/golang/go/src go1.25.0 os/.Openscip-go gomod github.com/golang/go/src go1.25.0 os/Open().(pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare.)
187 }
188
189 requireStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/requireStdin().(trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/.Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..Getscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#Get().("The --stdin flag expects a pointer file from STDIN."))
190
191 return osscip-go gomod github.com/golang/go/src go1.25.0 os/.Stdinscip-go gomod github.com/golang/go/src go1.25.0 os/Stdin., nil
192 }
193
194 func initscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/init().() {
195 RegisterCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/RegisterCommand().("pointer", pointerCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCommand()., func(cmd *cobrascip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/.Commandscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#) {
196 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().StringVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#StringVarP().(&pointerFilescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerFile., "file", "f", "", "Path to a local file to generate the pointer from.")
197 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().StringVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#StringVarP().(&pointerComparescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCompare., "pointer", "p", "", "Path to a local file containing a pointer built by another Git LFS implementation.")
198 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().BoolVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#BoolVarP().(&pointerStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStdin., "stdin", "", false, "Read a pointer built by another Git LFS implementation through STDIN.")
199 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().BoolVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#BoolVarP().(&pointerCheckscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerCheck., "check", "", false, "Check whether the given file is a Git LFS pointer.")
200 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().BoolVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#BoolVarP().(&pointerStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerStrict., "strict", "", false, "Check whether the given Git LFS pointer is canonical.")
201 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().BoolVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#BoolVarP().(&pointerNoStrictscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoStrict., "no-strict", "", false, "Don't check whether the given Git LFS pointer is canonical.")
202 cmd.Flagsscip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/Command#Flags().().BoolVarPscip-go gomod github.com/spf13/pflag v1.0.9 `github.com/spf13/pflag`/FlagSet#BoolVarP().(&pointerNoExtensionsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pointerNoExtensions., "no-extensions", "", false, "Don't print the extensions of the pointer.")
203 })
204 }