archive-tar: factor out write_block()
commitdfce1186c6034d6f4ea283f5178fd25cbd8f4fc0
authorRené Scharfe <l.s.r@web.de>
Wed, 15 Jun 2022 17:01:14 +0000 (15 19:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jun 2022 20:19:47 +0000 (15 13:19 -0700)
tree08043aaec98a9873740f1115bc35e7dced8131c8
parent96b9e5151bf0cad110d2f0bf16f413b9fc9f606c
archive-tar: factor out write_block()

All tar archive writes have the same size and are done to the same file
descriptor.  Move them to a common function, write_block(), to reduce
code duplication and make it easy to change the destination.

Original-patch-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-tar.c