Thread (1 message) 1 message, 1 author, 2024-05-20

Re: [PATCH v2] archive: make --add-virtual-file honor --prefix

From: Junio C Hamano <hidden>
Date: 2024-05-20 17:55:29

Tom Scogland [off-list ref] writes:
That said, it sounds like both you and Junio prefer updating the
docs rather than the code, which makes me think I'm in the
minority in that opinion.  If that's the case, I can certainly
update the docs, and I imagine we can backport that easily
wherever it makes sense.  I would really like to have the option
to have the prefix apply though, either adding a new flag or an
option to the existing one that would be invalid given current
syntax or similar to provide the option.
[jc: wrapped overly long lines]

Wouldn't

    #!/bin/sh
    prefix=foo/bar
    git archive --prefix="$prefix" --add-file=x --add-file=y \
	--add-virtual-file="$prefix/path:contents"

be an option enough?  You only have to define $prefix once.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help