Am 03.12.2010 22:50 schrieb Jeff King:
On Fri, Dec 03, 2010 at 01:25:36PM -0800, Junio C Hamano wrote:
That would break existing scripts that expect "-q" to squelch only the
error output, no? I think the risk of breaking existing scripts that
other people wrote over time that you (and I) haven't seen outweighs any
benefit (i.e. "if test $(rev-parse...) = true" vs "if rev-parse...") you
are seeing here.
Right now "-q" doesn't do _anything_ for --is-inside-work-tree, AFAICT.
It is a useless no-op. So I don't know if we are breaking anybody. What
does somebody doing "git rev-parse -q --is-inside-work-tree" expect to
happen?
Peff, Junio, thanks for your answers.
I already had a suspicion that changing plumbing tools like
rev-parse was a bad idea. You confirmed that. However, I still
think it's a little bug that "--show-dup" returns an empty string
instead of a dot when already in topdir. But it's too late to
change that, I guess. I didn't know about Peff's suggestions
"git-sh-setup" and "--show-toplevel". They may help me.
@Peff, right, it's annoying that -q sometimes works and
sometimes doesn't. To my opinion switches like --quiet and
--verbose should _always_ work.
Dirk
--
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