Thread (1 message) 1 message, 1 author, 2017-02-27

Re: [PATCH v7 4/6] stash: teach 'push' (and 'create_stash') to honor pathspec

From: Junio C Hamano <hidden>
Date: 2017-02-27 23:28:46

Thomas Gummerer [off-list ref] writes:
On 02/27, Junio C Hamano wrote:
quoted
Thomas Gummerer [off-list ref] writes:
quoted
+	test -n "$untracked" || git ls-files --error-unmatch -- "$@" >/dev/null || exit 1
This silent "exit 1" made me scratch my head, but --error-unmatch
would have already given an error message, like

    error: pathspec 'no such' did not match any file(s) known to git.
    Did you forget to 'git add'?

so that would be OK.
Yeah exactly, the plan was to let --error-unmatch print the error
message, as it's better at giving a good error message than we could
easily do here I think.

Maybe this deserves a comment so others won't have the same doubts
about this line?
Nah, I do not think so.  It probably is obvious for those who write
(and read) "--error-unmatch".  I was just being slow to realize that
the sole point of that option was to complain ;-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help