| 1 | package lfsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/ |
| 2 | |
| 3 | import ( |
| 4 | "bufioscip-go gomod github.com/golang/go/src go1.25.0 bufio/" |
| 5 | "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/" |
| 6 | "strconvscip-go gomod github.com/golang/go/src go1.25.0 strconv/" |
| 7 | "stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/" |
| 8 | |
| 9 | "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`/" |
| 10 | "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`/" |
| 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 | ) |
| 13 | |
| 14 | // Status represents the status of a file that appears in the output of `git |
| 15 | // diff-index`. |
| 16 | // |
| 17 | // More information about each of its valid instances can be found: |
| 18 | // https://git-scm.com/docs/git-diff-index |
| 19 | type DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# rune |
| 20 | |
| 21 | const ( |
| 22 | StatusAdditionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusAddition. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'A' |
| 23 | StatusCopyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusCopy. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'C' |
| 24 | StatusDeletionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusDeletion. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'D' |
| 25 | StatusModificationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusModification. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'M' |
| 26 | StatusRenamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusRename. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'R' |
| 27 | StatusTypeChangescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusTypeChange. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'T' |
| 28 | StatusUnmergedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusUnmerged. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'U' |
| 29 | StatusUnknownscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusUnknown. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# = 'X' |
| 30 | ) |
| 31 | |
| 32 | // String implements fmt.Stringer by returning a human-readable name for each |
| 33 | // status. |
| 34 | func (s DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus#) Stringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus#String().() string { |
| 35 | switch s { |
| 36 | case StatusAdditionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusAddition.: |
| 37 | return "addition" |
| 38 | case StatusCopyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusCopy.: |
| 39 | return "copy" |
| 40 | case StatusDeletionscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusDeletion.: |
| 41 | return "deletion" |
| 42 | case StatusModificationscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusModification.: |
| 43 | return "modification" |
| 44 | case StatusRenamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusRename.: |
| 45 | return "rename" |
| 46 | case StatusTypeChangescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusTypeChange.: |
| 47 | return "change" |
| 48 | case StatusUnmergedscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusUnmerged.: |
| 49 | return "unmerged" |
| 50 | case StatusUnknownscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/StatusUnknown.: |
| 51 | return "unknown" |
| 52 | } |
| 53 | return "<unknown>" |
| 54 | } |
| 55 | |
| 56 | // Format implements fmt.Formatter. If printed as "%+d", "%+s", or "%+v", the |
| 57 | // status will be written out as an English word: i.e., "addition", "copy", |
| 58 | // "deletion", etc. |
| 59 | // |
| 60 | // If the '+' flag is not given, the shorthand will be used instead: 'A', 'C', |
| 61 | // and 'D', respectively. |
| 62 | // |
| 63 | // If any other format verb is given, this function will panic(). |
| 64 | func (s DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus#) Formatscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus#Format().(state fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Statescip-go gomod github.com/golang/go/src go1.25.0 fmt/State#, c rune) { |
| 65 | switch c { |
| 66 | case 'd', 's', 'v': |
| 67 | if state.Flagscip-go gomod github.com/golang/go/src go1.25.0 fmt/State#Flag().('+') { |
| 68 | state.Writescip-go gomod github.com/golang/go/src go1.25.0 fmt/State#Write().([]byte(s.Stringscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus#String().())) |
| 69 | } else { |
| 70 | state.Writescip-go gomod github.com/golang/go/src go1.25.0 fmt/State#Write().([]byte{byte(rune(s))}) |
| 71 | } |
| 72 | default: |
| 73 | panic(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 format %v for DiffIndexStatus", c)) |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | // DiffIndexEntry holds information about a single item in the results of a `git |
| 78 | // diff-index` command. |
| 79 | type DiffIndexEntryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry# struct { |
| 80 | // SrcMode is the file mode of the "src" file, stored as a string-based |
| 81 | // octal. |
| 82 | SrcModescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#SrcMode. string |
| 83 | // DstMode is the file mode of the "dst" file, stored as a string-based |
| 84 | // octal. |
| 85 | DstModescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#DstMode. string |
| 86 | // SrcSha is the Git blob ID of the "src" file. |
| 87 | SrcShascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#SrcSha. string |
| 88 | // DstSha is the Git blob ID of the "dst" file. |
| 89 | DstShascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#DstSha. string |
| 90 | // Status is the status of the file in the index. |
| 91 | Statusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#Status. DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus# |
| 92 | // StatusScore is the optional "score" associated with a particular |
| 93 | // status. |
| 94 | StatusScorescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#StatusScore. int |
| 95 | // SrcName is the name of the file in its "src" state as it appears in |
| 96 | // the index. |
| 97 | SrcNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#SrcName. string |
| 98 | // DstName is the name of the file in its "dst" state as it appears in |
| 99 | // the index. |
| 100 | DstNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#DstName. string |
| 101 | } |
| 102 | |
| 103 | // DiffIndexScanner scans the output of the `git diff-index` command. |
| 104 | type DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner# struct { |
| 105 | // next is the next entry scanned by the Scanner. |
| 106 | nextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#next. *DiffIndexEntryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry# |
| 107 | // err is any error that the Scanner encountered while scanning. |
| 108 | errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. error |
| 109 | |
| 110 | // from is the underlying scanner, scanning the `git diff-index` |
| 111 | // command's stdout. |
| 112 | fromscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#from. *bufioscip-go gomod github.com/golang/go/src go1.25.0 bufio/.Scannerscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner# |
| 113 | } |
| 114 | |
| 115 | // NewDiffIndexScanner initializes a new `DiffIndexScanner` scanning at the |
| 116 | // given ref, "ref". |
| 117 | // |
| 118 | // If "cache" is given, the DiffIndexScanner will scan for differences between |
| 119 | // the given ref and the index. If "cache" is _not_ given, DiffIndexScanner will |
| 120 | // scan for differences between the given ref and the currently checked out |
| 121 | // tree. |
| 122 | // |
| 123 | // If "refresh" is given, the DiffIndexScanner will refresh the index. This is |
| 124 | // probably what you want in all cases except fsck, where invoking a filtering |
| 125 | // operation would be undesirable due to the possibility of corruption. It can |
| 126 | // also be disabled where another operation will have refreshed the index. |
| 127 | // |
| 128 | // If "workingDir" is set, the DiffIndexScanner will be run in the given |
| 129 | // directory. Otherwise, the DiffIndexScanner will be run in the current |
| 130 | // working directory. |
| 131 | // |
| 132 | // If any error was encountered in starting the command or closing its `stdin`, |
| 133 | // that error will be returned immediately. Otherwise, a `*DiffIndexScanner` |
| 134 | // will be returned with a `nil` error. |
| 135 | func NewDiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/NewDiffIndexScanner().(ref string, cached bool, refresh bool, workingDir string) (*DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#, error) { |
| 136 | scanner, err := gitscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/.DiffIndexscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/git`/DiffIndex().(ref, cached, refresh, workingDir) |
| 137 | if err != nil { |
| 138 | return nil, err |
| 139 | } |
| 140 | return &DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#{ |
| 141 | fromscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#from.: scanner, |
| 142 | }, nil |
| 143 | } |
| 144 | |
| 145 | // Scan advances the scan line and yields either a new value for Entry(), or an |
| 146 | // Err(). It returns true or false, whether or not it can continue scanning for |
| 147 | // more entries. |
| 148 | func (s *DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#) Scanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#Scan().() bool { |
| 149 | if !s.prepareScanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#prepareScan().() { |
| 150 | return false |
| 151 | } |
| 152 | |
| 153 | s.nextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#next., s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. = s.scanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#scan().(s.fromscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#from..Textscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner#Text().()) |
| 154 | if s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. != nil { |
| 155 | s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. = 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().(s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#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().("`git diff-index` scan")) |
| 156 | } |
| 157 | |
| 158 | return s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. == nil |
| 159 | } |
| 160 | |
| 161 | // Entry returns the last entry that was Scan()'d by the DiffIndexScanner. |
| 162 | func (s *DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#) Entryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#Entry().() *DiffIndexEntryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry# { return s.nextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#next. } |
| 163 | |
| 164 | // Entry returns the last error that was encountered by the DiffIndexScanner. |
| 165 | func (s *DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#) Errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#Err().() error { return s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. } |
| 166 | |
| 167 | // prepareScan clears out the results from the last Scan() loop, and advances |
| 168 | // the internal scanner to fetch a new line of Text(). |
| 169 | func (s *DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#) prepareScanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#prepareScan().() bool { |
| 170 | s.nextscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#next., s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. = nil, nil |
| 171 | if !s.fromscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#from..Scanscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner#Scan().() { |
| 172 | s.errscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#err. = s.fromscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#from..Errscip-go gomod github.com/golang/go/src go1.25.0 bufio/Scanner#Err().() |
| 173 | return false |
| 174 | } |
| 175 | |
| 176 | return true |
| 177 | } |
| 178 | |
| 179 | // scan parses the given line and returns a `*DiffIndexEntry` or an error, |
| 180 | // depending on whether or not the parse was successful. |
| 181 | func (s *DiffIndexScannerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#) scanscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexScanner#scan().(line string) (*DiffIndexEntryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#, error) { |
| 182 | // Format is: |
| 183 | // :100644 100644 c5b3d83a7542255ec7856487baa5e83d65b1624c 9e82ac1b514be060945392291b5b3108c22f6fe3 M foo.gif |
| 184 | // :<old mode> <new mode> <old sha1> <new sha1> <status>\t<file name>[\t<file name>] |
| 185 | |
| 186 | parts := stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.25.0 strings/Split().(line, "\t") |
| 187 | if len(parts) < 2 { |
| 188 | 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 line: %s", line)) |
| 189 | } |
| 190 | |
| 191 | desc := stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Fieldsscip-go gomod github.com/golang/go/src go1.25.0 strings/Fields().(parts[0]) |
| 192 | if len(desc) < 5 { |
| 193 | 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 description: %s", parts[0])) |
| 194 | } |
| 195 | |
| 196 | entry := &DiffIndexEntryscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#{ |
| 197 | SrcModescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#SrcMode.: stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.TrimPrefixscip-go gomod github.com/golang/go/src go1.25.0 strings/TrimPrefix().(desc[0], ":"), |
| 198 | DstModescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#DstMode.: desc[1], |
| 199 | SrcShascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#SrcSha.: desc[2], |
| 200 | DstShascip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#DstSha.: desc[3], |
| 201 | Statusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#Status.: DiffIndexStatusscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexStatus#(rune(desc[4][0])), |
| 202 | SrcNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#SrcName.: parts[1], |
| 203 | } |
| 204 | |
| 205 | if score, err := strconvscip-go gomod github.com/golang/go/src go1.25.0 strconv/.Atoiscip-go gomod github.com/golang/go/src go1.25.0 strconv/Atoi().(desc[4][1:]); err != nil { |
| 206 | entry.StatusScorescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#StatusScore. = score |
| 207 | } |
| 208 | |
| 209 | if len(parts) > 2 { |
| 210 | entry.DstNamescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfs`/DiffIndexEntry#DstName. = parts[2] |
| 211 | } |
| 212 | |
| 213 | return entry, nil |
| 214 | } |