Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/2] Add revision range support on "-" and "@{-1}"

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:17

Kenny Lee Sin Cheong [off-list ref] writes:
If I'm understanding correctly, the problem of checking revisions before
arg is that an option fed to handle_revision_arg() might die() before getting
checked as an option in cases where a file with the same name exists?

But doesn't verify_non_filename() already return silently if arg begins
with "-"? It die() only after making that check.

If an option with ".." in it such as -$opt..ion is really given to
handle_revision_arg() then verify_non_filename should not be a problem.
Yes, but should we be relying on that behaviour?  The special casing
to assume that no sane person would name a file starting with a dash
is what I find somewhat disturbing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help