Skip to content

Commit 0c43911

Browse files
avargitster
authored andcommitted
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 fd17f5b (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 692654d commit 0c43911

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/mktag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ int cmd_mktag(int argc, const char **argv, const char *prefix)
161161
if (argc != 1)
162162
usage("git mktag");
163163

164-
if (strbuf_read(&buf, 0, 4096) < 0) {
164+
if (strbuf_read(&buf, 0, 0) < 0) {
165165
die_errno("could not read from stdin");
166166
}
167167

0 commit comments

Comments
 (0)