1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-30 16:06:13 +02:00

mktag: use default strbuf_read() hint

Change the hardcoded hint of 2^12 to 0. The default strbuf hint is
perfectly fine here, and the only reason we were hardcoding it is
because it survived migration from a pre-strbuf fixed-sized buffer.

See fd17f5b5f7 (Replace all read_fd use with strbuf_read, and get rid
of it., 2007-09-10) for that migration.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-01-05 20:42:43 +01:00 committed by Junio C Hamano
parent 692654dca0
commit 0c439117bb

View File

@ -161,7 +161,7 @@ int cmd_mktag(int argc, const char **argv, const char *prefix)
if (argc != 1)
usage("git mktag");
if (strbuf_read(&buf, 0, 4096) < 0) {
if (strbuf_read(&buf, 0, 0) < 0) {
die_errno("could not read from stdin");
}