(ctx *uploadContext, oids []string)
| 102 | } |
| 103 | |
| 104 | func uploadsWithObjectIDs(ctx *uploadContext, oids []string) { |
| 105 | pointers := make([]*lfs.WrappedPointer, len(oids)) |
| 106 | for i, oid := range oids { |
| 107 | mp, err := ctx.gitfilter.ObjectPath(oid) |
| 108 | if err != nil { |
| 109 | ExitWithError(errors.Wrap(err, tr.Tr.Get("Unable to find local media path:"))) |
| 110 | } |
| 111 | |
| 112 | stat, err := os.Stat(mp) |
| 113 | if err != nil { |
| 114 | ExitWithError(errors.Wrap(err, tr.Tr.Get("Unable to stat local media path"))) |
| 115 | } |
| 116 | |
| 117 | pointers[i] = &lfs.WrappedPointer{ |
| 118 | Name: mp, |
| 119 | Pointer: &lfs.Pointer{ |
| 120 | Oid: oid, |
| 121 | Size: stat.Size(), |
| 122 | }, |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | q := ctx.NewQueue(tq.RemoteRef(currentRemoteRef())) |
| 127 | ctx.UploadPointers(q, pointers...) |
| 128 | ctx.CollectErrors(q) |
| 129 | ctx.ReportErrors() |
| 130 | } |
| 131 | |
| 132 | // lfsPushRefs returns valid ref updates from the given ref and --all arguments. |
| 133 | // Either one or more refs can be explicitly specified, or --all indicates all |
no test coverage detected