2011/5/8 Junio C Hamano <gitster@xxxxxxxxx>: > Nguyán ThÃi Ngác Duy Â<pclouds@xxxxxxxxx> writes: > >> That was the intention, but it raises a question: what do we do if a >> file happens to have the same name with the given magic pathspec, as >> in the last two tests? > > I would have expected that in such a case the user would pass a "\:" or > even ":::" to match the file ":", and "\:(rubbish)" to match the file > ":(rubbish)". ÂThe whole ":" is special thing comes from the observation > that a path that begins with a colon is rare, so it is Ok to require the > user to do some more work (typing an extra backslash) when he really wants > to match with such a thing. > > A script that takes a pathname that is meant to be a literal from the user > in its variable $x would pass ":(noglob)$x" when it wants to be strict. ÂA > script that lets the user say whatever and wants to pass would just pass > "$x" along the callchain. > > I do not expect this to be an issue in practice, though. ÂHave you seen a > script that tries to quote all the possible globbing characters in "$x" > before calling into git with the current codebase without this magic? Point taken. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html