tangled
alpha
login
or
join now
runxiyu.tngl.sh
/
furgit
6
fork
atom
Fast implementation of Git in pure Go
6
fork
atom
overview
issues
pulls
pipelines
format/pack/ingest: Thin pack fixing progress
runxiyu.tngl.sh
5 days ago
e4659ebe
b99e3390
verified
This commit was signed with the committer's
known signature
.
runxiyu.tngl.sh
SSH Key Fingerprint:
SHA256:jdcgZM4f40eqgoEW57poBu5vM9WoGE02ZzhWbfbNzc0=
+8
-2
1 changed file
expand all
collapse all
unified
split
format
pack
ingest
thin_fix.go
+8
-2
format/pack/ingest/thin_fix.go
···
55
55
56
56
baseIDs := unresolvedThinBaseIDs(state)
57
57
total := len(baseIDs)
58
58
+
if total > 0 {
59
59
+
utils.WriteProgressf(state.opts.Progress, "fixing thin pack: 0%% (0/%d)\r", total)
60
60
+
}
61
61
+
58
62
for i, id := range baseIDs {
59
63
ty, content, err := state.opts.Base.ReadBytesContent(id)
60
64
if err != nil {
···
68
72
69
73
state.thinFixed = true
70
74
71
71
-
utils.WriteProgressf(state.opts.Progress, "fixing thin pack: %d/%d\r", i+1, total)
75
75
+
done := i + 1
76
76
+
percent := done * 100 / total
77
77
+
utils.WriteProgressf(state.opts.Progress, "fixing thin pack: %3d%% (%d/%d)\r", percent, done, total)
72
78
}
73
79
74
80
err = rewritePackHeaderAndTrailer(state)
···
77
83
}
78
84
79
85
if state.thinFixed {
80
80
-
utils.WriteProgressf(state.opts.Progress, "fixing thin pack: done.\n")
86
86
+
utils.WriteProgressf(state.opts.Progress, "fixing thin pack: 100%% (%d/%d), done.\n", total, total)
81
87
}
82
88
83
89
return nil