Thread (3 messages) 3 messages, 3 authors, 2016-06-15

Re: Q about git rev-parse {--is-inside-work-tree, --show-cdup}

flat view

From: Dirk Süsserott <hidden>
Date: 2016-06-15 22:50:10

Am 03.12.2010 22:50 schrieb Jeff King:
On Fri, Dec 03, 2010 at 01:25:36PM -0800, Junio C Hamano wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help