зеркало из https://github.com/microsoft/git.git
t5703: feed raw data into test-tool unpack-sideband
busybox's sed isn't binary clean. Thus, triggers false-negative on this test. We could replace sed with perl on this usecase. But, we could slightly modify the helper to discard unwanted data in the beginning. Fix the false negative by updating this helper. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
f73533aa38
Коммит
84370e36bb
|
@ -67,7 +67,7 @@ static void unpack_sideband(void)
|
||||||
case PACKET_READ_NORMAL:
|
case PACKET_READ_NORMAL:
|
||||||
band = reader.line[0] & 0xff;
|
band = reader.line[0] & 0xff;
|
||||||
if (band < 1 || band > 2)
|
if (band < 1 || band > 2)
|
||||||
die("unexpected side band %d", band);
|
continue; /* skip non-sideband packets */
|
||||||
fd = band;
|
fd = band;
|
||||||
|
|
||||||
write_or_die(fd, reader.line + 1, reader.pktlen - 1);
|
write_or_die(fd, reader.line + 1, reader.pktlen - 1);
|
||||||
|
|
|
@ -13,10 +13,7 @@ get_actual_refs () {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_actual_commits () {
|
get_actual_commits () {
|
||||||
sed -n -e '/packfile/,/0000/{
|
test-tool pkt-line unpack-sideband <out >o.pack &&
|
||||||
/packfile/d
|
|
||||||
p
|
|
||||||
}' <out | test-tool pkt-line unpack-sideband >o.pack &&
|
|
||||||
git index-pack o.pack &&
|
git index-pack o.pack &&
|
||||||
git verify-pack -v o.idx >objs &&
|
git verify-pack -v o.idx >objs &&
|
||||||
grep commit objs | cut -d" " -f1 | sort >actual_commits
|
grep commit objs | cut -d" " -f1 | sort >actual_commits
|
||||||
|
|
Загрузка…
Ссылка в новой задаче