Am 20.05.24 um 18:10 schrieb Tom Scogland: > > On 19 May 2024, at 6:25, René Scharfe wrote: > >> You can already specify any path you want with --add-virtual-file. >> What's the advantage of honoring --prefix as well? > > I came into this after trying to translate an --add-file to an > --add-virtual-file and being surprised that the prefix wasn't > applied. Understandable, the documentation promised otherwise and the options have very similar names. > anything else you add, in the repo or not, it gets the prefix.> I can go back and explicitly add the prefix, but it makes the > options less naturally composable in my opinion. True, applying the prefix to all items would be simpler overall. Speaking of simpler: --add-virtual-file could have been implemented to only take a single argument -- the content -- and rely on --prefix to provide the full path. That's more consistent with other options, as most of them only take single-valued arguments (or none). :] > 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. I'm not sure I have an opinion on that topic, yet. Fixing the documentation is certainly easier. Adding the prefix to the path of virtual files as well is a breaking change. I feel that the easier route should at least be mentioned in the commit message and why it was not taken. > 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. You mean like replacing a leading colon in the path with the prefix? René