Browse Source

fix 1773

add comment
tags/v1.22.5.1^2
chenyifan01 3 years ago
parent
commit
98ade55866
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      modules/repofiles/update.go

+ 3
- 0
modules/repofiles/update.go View File

@@ -940,10 +940,13 @@ func moveAndAddFiles(oldTreePath, newTreePath string, t *TemporaryUploadReposito
if v == "" {
continue
}
//example for v(mode SHA-1 stage file)
//100755 d294c88235ac05d3dece028d8a65590f28ec46ac 0 custom/conf/app.ini
v = strings.ReplaceAll(v, "0\t", "")
tmpArray := strings.Split(v, " ")
oldPath := tmpArray[2]
newPath := newTreePath + strings.TrimPrefix(oldPath, oldTreePath)
// mode 0 means remove file
stdIn.WriteString("0 0000000000000000000000000000000000000000\t")
stdIn.WriteString(oldPath)
stdIn.WriteByte('\000')


Loading…
Cancel
Save