summaryrefslogtreecommitdiff
path: root/archive-tar.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2019-08-17 16:24:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-19 17:49:00 (GMT)
commit71d41ff651a54028856c4224777ef405de48ae66 (patch)
tree4836fec19c0b4a9138fcccd95671fd7984fd29e3 /archive-tar.c
parent17e9ef00d29b349727e3c710869217a36ad08224 (diff)
downloadgit-71d41ff651a54028856c4224777ef405de48ae66.zip
git-71d41ff651a54028856c4224777ef405de48ae66.tar.gz
git-71d41ff651a54028856c4224777ef405de48ae66.tar.bz2
archive-tar: turn length miscalculation warning into BUG
Now that we're confident our pax extended header calculation is correct, turn the criticality of the assertion up to the maximum, from warning right up to BUG. Simplify the test, as the stderr comparison step would not be reached in case the BUG message is triggered. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive-tar.c')
-rw-r--r--archive-tar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/archive-tar.c b/archive-tar.c
index 29ca216..e7153c6 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -158,9 +158,9 @@ static void strbuf_append_ext_header(struct strbuf *sb, const char *keyword,
strbuf_addch(sb, '\n');
if (len != sb->len - orig_len)
- warning("pax extended header length miscalculated as %"PRIuMAX
- ", should be %"PRIuMAX,
- (uintmax_t)len, (uintmax_t)(sb->len - orig_len));
+ BUG("pax extended header length miscalculated as %"PRIuMAX
+ ", should be %"PRIuMAX,
+ (uintmax_t)len, (uintmax_t)(sb->len - orig_len));
}
/*