Re: [PATCH v2] archive: make --add-virtual-file honor --prefix
Tom Scogland <scogland1@llnl.gov> writes:
Show 8 quoted lines
> 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.