|
|
|
@@ -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') |
|
|
|
|