path: root/tar.h
AgeCommit message (Collapse)Author
2019-11-07kset.h, tar.h: add missing header guard to prevent multiple inclusionElia Pinto
Add missing headers to prevent ill-effects from multiple inclusion. Found by the LGTM source code analyzer. Signed-off-by: Elia Pinto <> Signed-off-by: Junio C Hamano <>
2006-03-26tar-tree: Introduce write_entry()Rene Scharfe
... and use it initially to write global extended header records. Improvements compared to the old write_header(): - Uses a struct ustar_header instead of hardcoded offsets. - Takes one struct strbuf as path argument instead of a (basedir, prefix, name) tuple. - Not only writes the tar header, but also the contents of the file, if any. - Does not write directly into the ring buffer. This allows the code to be layed out more naturally, because there is no more ordering constraint. Before we had to first finish writing the extended header, now we can construct the extended and normal headers in parallel. - The typeflag parameter has been replaced by (reasonable) magic values. path == NULL indicates an extended header, additionally sha1 == NULL means it is a global extended header. Signed-off-by: Rene Scharfe <> Signed-off-by: Junio C Hamano <>