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

Re: [PATCH] diff-tree: do not show the sha1 of the given head with --quiet

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 23, 2015, 20:43 UTC
Message-ID
<xmqqzj2mobac.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAHGBnuM6sgegeq0AXTcS7QNX4_X3GYNf--srq0HH0K_owG3JQg@mail.gmail.com>
Sebastian Schuberth <sschuberth@gmail.com> writes:
Show 8 quoted lines
> On Thu, Jul 23, 2015 at 9:39 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
>> I haven't dug into why that happens, but possible ways to fix that
>> are to make "--quiet" output all (making it consistent with "-s") or
>> no (making the command totally silent) output at all ;-).
>
> Exactly, and I chose the latter to add some value to --quiet instead
> of making it an alias for -s.

Heh. You didn't even know when "diff-tree --stdin --quiet" would be useful, let alone that it had a bug that made it useless for that exact use case. So it cannot be "I chose the latter".

I just gave you a hint so that you can write a plausible-sounding justification, and we both know that it is very different from your original motivation.

Be honest.
Perhaps the log message would say something like this:
	$ git rev-list ... | git diff-tree --stdin --quiet [$pathspec]
	is a way to list the commits that modifies the named paths,
        but this bug <<<analysis of the bug comes here>>> makes it
        not to emit all such commits.  It couldn't have been used
        by existing scripts with this longstanding bug.
	We could fix it so that it does not randomly skip commits
	that ought to be shown, but that feature is already
	available by the "-s" option instead of "--quiet".
        So let's change the meaning of "--quiet" to make it really
        quiet, without giving any output.  Strictly speaking, this
        may break backward compatibility but the existing behaviour
        to randomly omit commits couldn't have been useful, so there
        is no harm done.
	And as an added bonus,
	$ git diff-tree --quiet $commit [$pathspec]
	would stop showing the commit object name.

The analysis of the bug is really crucial for the above description to work as justification for this change, substanciating the words "longstanding" and "randomly omit" that are used to convince us that this option couldn't have been used by real scripts.

Previous: Sebastian SchuberthNext: Sebastian Schuberth
Message 12 of 14 in “diff-tree: do not show the sha1 of the given head with --quiet”
  1. diff-tree: do not show the sha1 of the given head with --quietSebastian Schuberth, Jul 22, 2015
  2. Johannes SchindelinJul 22, 2015
  3. diff-tree: do not show the sha1 of the given head with --quietSebastian Schuberth, Jul 22, 2015
  4. Junio C HamanoJul 22, 2015
  5. Sebastian SchuberthJul 23, 2015
  6. Junio C HamanoJul 23, 2015
  7. Junio C HamanoJul 23, 2015
  8. Sebastian SchuberthJul 23, 2015
  9. Jeff KingJul 23, 2015
  10. Junio C HamanoJul 23, 2015
  11. Sebastian SchuberthJul 23, 2015
  12. Junio C HamanoJul 23, 2015
  13. Sebastian SchuberthJul 23, 2015
  14. Jeff KingJul 24, 2015

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.