git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: alias -q to --quiet

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 14, 2017, 02:37 UTC
Message-ID
<xmqq60biv4if.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20171013175656.qitarz6lvrppyb5f@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> So there are two separate questions/tasks:
>
>   1. Should we remove the special handling of "-q" leftover from this
>      deprecation? I think the answer is yes.
>
>   2. Should we teach the diff machinery as a whole to treat "-q" as a
>      synonym for "--quiet".
Good questions.  And thanks for archaeology.

The topic #1 above is something that should have happened when "-q" stopped working as "--diff-filter=d", and we probably should have started to error out then, so that scripts that relied on the original behaviour would have been forced to update. That did not happen which was a grave mistake.

By doing so, we would have made sure any script that uses "-q" died out, and after a while, we can talk about reusing it for other purposes, like the topic #2 above.

Is it worth making "-q" error out while doing #1 and keep it error out for a few years? I have a feeling that the answer might be unfortunately yes _if_ we want to also do #2. Even though we broke "-q" for the scripts who wanted to see it ignore only the removals 4 years ago and left it broken since then. Removals are much rarer than modifications and additions, so it wouldn't be surprising if the users of these scripts simply did not notice the old breakage, but if we made "-q" to mean "--quiet" without doing #1, they will break, as all diffs these scripts work on will suddenly give an empty output.

If we aren't doing #2, then I do not think we need to make "-q" error out when we do #1, though.

In any case, if we were to do both of the above two, they must happen in that order, not the other way around.

Thanks.
Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “diff: alias -q to --quiet”
  1. diff: alias -q to --quietAnthony Sottile, Oct 13, 2017
  2. Jeff KingOct 13, 2017
  3. Junio C HamanoOct 14, 2017
  4. Jeff KingOct 16, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.