| 1 | package commandsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ |
| 2 | |
| 3 | import ( |
| 4 | "bufioscip-go gomod github.com/golang/go/src go1.25.0 bufio/" |
| 5 | "osscip-go gomod github.com/golang/go/src go1.25.0 os/" |
| 6 | |
| 7 | "github.com/git-lfs/git-lfs/v3/errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/" |
| 8 | "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`/" |
| 9 | "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`/" |
| 10 | "github.com/git-lfs/git-lfs/v3/tqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/" |
| 11 | "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`/" |
| 12 | "github.com/rubyist/tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/" |
| 13 | "github.com/spf13/cobrascip-go gomod github.com/spf13/cobra v1.10.2 `github.com/spf13/cobra`/" |
| 14 | ) |
| 15 | |
| 16 | var ( |
| 17 | pushDryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushDryRun. = false |
| 18 | pushObjectIDsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushObjectIDs. = false |
| 19 | pushAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushAll. = false |
| 20 | useStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/useStdin. = false |
| 21 | |
| 22 | // shares some global vars and functions with command_pre_push.go |
| 23 | ) |
| 24 | |
| 25 | // pushCommand pushes local objects to a Git LFS server. It has four forms: |
| 26 | // |
| 27 | // `<remote> <ref>...` |
| 28 | // `<remote> --stdin` (reads refs from stdin) |
| 29 | // `<remote> --object-id <oid>...` |
| 30 | // `<remote> --object-id --stdin` (reads oids from stdin) |
| 31 | // |
| 32 | // Remote must be a remote name, not a URL. With --stdin, values are newline |
| 33 | // separated. |
| 34 | // |
| 35 | // pushCommand calculates the git objects to send by comparing the range |
| 36 | // of commits between the local and remote git servers. |
| 37 | func pushCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushCommand().(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) { |
| 38 | if len(args) == 0 { |
| 39 | Exitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Exit().(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().("Specify a remote and a remote branch name (`git lfs push origin main`)")) |
| 40 | } |
| 41 | |
| 42 | requireGitVersionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/requireGitVersion().() |
| 43 | |
| 44 | // Remote is first arg |
| 45 | if err := cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..SetValidPushRemotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#SetValidPushRemote().(args[0]); err != nil { |
| 46 | Exitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Exit().(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().("Invalid remote name %q: %s", args[0], err)) |
| 47 | } |
| 48 | |
| 49 | ctx := newUploadContextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/newUploadContext().(pushDryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushDryRun.) |
| 50 | |
| 51 | var argList []string |
| 52 | if useStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/useStdin. { |
| 53 | if len(args) > 1 { |
| 54 | Exitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Exit().(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().("Further command line arguments are ignored with --stdin")) |
| 55 | } |
| 56 | |
| 57 | scanner := bufioscip-go gomod github.com/golang/go/src go1.25.0 bufio/.NewScannerscip-go gomod github.com/golang/go/src go1.25.0 bufio/NewScanner().(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.) // line-delimited |
| 58 | for scanner.Scanscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner#Scan().() { |
| 59 | line := scanner.Textscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner#Text().() |
| 60 | if line != "" { |
| 61 | argList = append(argList, line) |
| 62 | } |
| 63 | } |
| 64 | if err := scanner.Errscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner#Err().(); err != nil { |
| 65 | ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Wrapscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/Wrap().(err, 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().("Error reading from stdin:"))) |
| 66 | } |
| 67 | } else { |
| 68 | argList = args[1:] |
| 69 | } |
| 70 | |
| 71 | if pushObjectIDsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushObjectIDs. { |
| 72 | // We allow no object IDs with `--stdin` to make scripting |
| 73 | // easier and avoid having to special-case this in scripts. |
| 74 | if !useStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/useStdin. && len(argList) < 1 { |
| 75 | Printscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Print().(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().("At least one object ID must be supplied with --object-id")) |
| 76 | ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1) |
| 77 | } |
| 78 | uploadsWithObjectIDsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadsWithObjectIDs().(ctx, argList) |
| 79 | } else { |
| 80 | if !useStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/useStdin. && !pushAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushAll. && len(argList) < 1 { |
| 81 | Printscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Print().(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().("At least one ref must be supplied without --all")) |
| 82 | ExitWithCodescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithCode().(1) |
| 83 | } |
| 84 | uploadsBetweenRefAndRemotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadsBetweenRefAndRemote().(ctx, argList) |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | func uploadsBetweenRefAndRemotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadsBetweenRefAndRemote().(ctx *uploadContextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#, refnames []string) { |
| 89 | tracerxscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/.Printfscip-go gomod github.com/rubyist/tracerx 787959303086 `github.com/rubyist/tracerx`/Printf().("Upload refs %v to remote %v", refnames, ctx.Remotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#Remote.) |
| 90 | |
| 91 | updates, err := lfsPushRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/lfsPushRefs().(refnames, pushAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushAll.) |
| 92 | if err != nil { |
| 93 | Errorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Error().(err.Error()) |
| 94 | Exitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/Exit().(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().("Error getting local refs.")) |
| 95 | } |
| 96 | |
| 97 | if err := uploadForRefUpdatesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadForRefUpdates().(ctx, updates, pushAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushAll.); err != nil { |
| 98 | ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(err) |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | func uploadsWithObjectIDsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadsWithObjectIDs().(ctx *uploadContextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#, oids []string) { |
| 103 | pointers := make([]*lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.WrappedPointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/WrappedPointer#, len(oids)) |
| 104 | for i, oid := range oids { |
| 105 | mp, err := ctx.gitfilterscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#gitfilter..ObjectPathscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/GitFilter#ObjectPath().(oid) |
| 106 | if err != nil { |
| 107 | ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Wrapscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/Wrap().(err, 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().("Unable to find local media path:"))) |
| 108 | } |
| 109 | |
| 110 | stat, err := osscip-go gomod github.com/golang/go/src go1.25.0 os/.Statscip-go gomod github.com/golang/go/src go1.25.0 os/Stat().(mp) |
| 111 | if err != nil { |
| 112 | ExitWithErrorscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/ExitWithError().(errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Wrapscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/Wrap().(err, 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().("Unable to stat local media path"))) |
| 113 | } |
| 114 | |
| 115 | pointers[i] = &lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/.WrappedPointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/WrappedPointer#{ |
| 116 | Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/WrappedPointer#Name.: mp, |
| 117 | Pointerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/WrappedPointer#Pointer.: &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#{ |
| 118 | Oidscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/Pointer#Oid.: oid, |
| 119 | Sizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/Pointer#Size.: stat.Sizescip-go gomod github.com/golang/go/src go1.25.0 `io/fs`/FileInfo#Size().(), |
| 120 | }, |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | q := ctx.NewQueuescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#NewQueue().(tqscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/.RemoteRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tq`/RemoteRef().(pushRemoteRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushRemoteRef().())) |
| 125 | ctx.UploadPointersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#UploadPointers().(q, pointers...) |
| 126 | ctx.CollectErrorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#CollectErrors().(q) |
| 127 | ctx.ReportErrorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/uploadContext#ReportErrors().() |
| 128 | } |
| 129 | |
| 130 | // lfsPushRefs returns valid ref updates from the given ref and --all arguments. |
| 131 | // Either one or more refs can be explicitly specified, or --all indicates all |
| 132 | // local refs are pushed. |
| 133 | func lfsPushRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/lfsPushRefs().(refnames []string, pushAll bool) ([]*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefUpdatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefUpdate#, error) { |
| 134 | localrefs, err := gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.LocalRefsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/LocalRefs().() |
| 135 | if err != nil { |
| 136 | return nil, err |
| 137 | } |
| 138 | |
| 139 | if pushAll && len(refnames) == 0 { |
| 140 | refs := make([]*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefUpdatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefUpdate#, len(localrefs)) |
| 141 | for i, lr := range localrefs { |
| 142 | refs[i] = gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.NewRefUpdatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/NewRefUpdate().(cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..Gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#Git., cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..PushRemotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#PushRemote().(), lr, nil) |
| 143 | } |
| 144 | return refs, nil |
| 145 | } |
| 146 | |
| 147 | reflookup := make(map[string]*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#, len(localrefs)) |
| 148 | for _, ref := range localrefs { |
| 149 | reflookup[ref.Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Name.] = ref |
| 150 | } |
| 151 | |
| 152 | refs := make([]*gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefUpdatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefUpdate#, len(refnames)) |
| 153 | for i, name := range refnames { |
| 154 | if ref, ok := reflookup[name]; ok { |
| 155 | refs[i] = gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.NewRefUpdatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/NewRefUpdate().(cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..Gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#Git., cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..PushRemotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#PushRemote().(), ref, nil) |
| 156 | } else { |
| 157 | ref := &gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.Refscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#{Namescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Name.: name, Typescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Type.: gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.RefTypeOtherscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/RefTypeOther., Shascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/Ref#Sha.: name} |
| 158 | if _, err := gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.ResolveRefscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/ResolveRef().(name); err != nil { |
| 159 | return nil, errorsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/errors`/.Newscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/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().("Invalid ref argument: %v", name)) |
| 160 | } |
| 161 | refs[i] = gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.NewRefUpdatescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/NewRefUpdate().(cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..Gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#Git., cfgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/cfg..PushRemotescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/config`/Configuration#PushRemote().(), ref, nil) |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | return refs, nil |
| 166 | } |
| 167 | |
| 168 | func initscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/init().() { |
| 169 | RegisterCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/RegisterCommand().("push", pushCommandscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushCommand()., 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#) { |
| 170 | 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().(&pushDryRunscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushDryRun., "dry-run", "d", false, "Do everything except actually send the updates") |
| 171 | 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().(&pushObjectIDsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushObjectIDs., "object-id", "o", false, "Push LFS object ID(s)") |
| 172 | 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().(&useStdinscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/useStdin., "stdin", "", false, "Read object IDs or refs from stdin") |
| 173 | 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().(&pushAllscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/commands`/pushAll., "all", "a", false, "Push all objects for the current ref to the remote.") |
| 174 | }) |
| 175 | } |