archive: optionally add "virtual" files
commit237a1d138c4322a7e934f129dee02e2ea6a214cd
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 28 May 2022 23:11:12 +0000 (28 16:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 May 2022 06:07:22 +0000 (30 23:07 -0700)
tree72146e883c5056136fdf0aabddd1160f9cf55747
parent23f2356fd902434a9b8e9e4cdae735f399c16ff0
archive: optionally add "virtual" files

With the `--add-virtual-file=<path>:<content>` option, `git archive` now
supports use cases where relatively trivial files need to be added that
do not exist on disk.

This will allow us to generate `.zip` files with generated content,
without having to add said content to the object database and without
having to write it out to disk.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
[jc: tweaked <path> handling]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-archive.txt
archive.c
t/t5003-archive-zip.sh