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

Re: [PATCH 04/11] builtin rebase: support --quiet

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 27, 2018, 12:31 UTC
Message-ID
<nycvar.QRO.7.76.6.1808271416410.73@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqsh3ofy4f.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Wed, 8 Aug 2018, Junio C Hamano wrote:
Show 16 quoted lines
> Stefan Beller <sbeller@google.com> writes:
> 
> > On Wed, Aug 8, 2018 at 6:51 AM Pratik Karki <predatoramigo@gmail.com> wrote:
> >>
> >> This commit introduces a rebase option `--quiet`. While `--quiet` is
> >> commonly perceived as opposite to `--verbose`, this is not the case for
> >> the rebase command: both `--quiet` and `--verbose` default to `false` if
> >> neither `--quiet` nor `--verbose` is present.
> >>
> >> This commit goes further and introduces `--no-quiet` which is the
> >> contrary of `--quiet` and it's introduction doesn't modify any
> >> behaviour.
> 
> Why?  Is it for completeness (i.e. does the scripted version take
> such an option and addition of --no-quiet makes the C rewrite behave
> the same)?

Ah. I mentioned that an explanation for this is needed in the commit message, and I guess that it is a bit too subtle. The part you clipped from your quoted text says:

	[... `--quiet`] switches off --verbose and --stat, and as
	--verbose switches off --quiet, we use the (negated)
	REBASE_NO_QUIET instead of REBASE_QUIET: this allows us to turn
	off the quiet mode and turn on the verbose and diffstat mode in a
	single OPT_BIT(), and the opposite in a single OPT_NEGBIT().

I agree that this is a pretty convoluted way to express the issue. See below for an attempt at a clearer commit message.

Show 9 quoted lines
> >> Note: The `flags` field in `rebase_options` will accumulate more bits in
> >> subsequent commits, in particular a verbose and a diffstat flag. And as
> >> --quoet inthe shell scripted version of the rebase command switches off
> >
> >   --quote in the
> >
> > (in case a resend is needed)
> 
> Meaning --quiet?
Yep. I should have paid more attention in my pre-submission review, sorry.
I changed the commit message to read like this:
	builtin rebase: support --quiet
	This commit introduces a rebase option `--quiet`. While `--quiet` is
	commonly perceived as opposite to `--verbose`, this is not the case for
	the rebase command: both `--quiet` and `--verbose` default to `false` if
	neither `--quiet` nor `--verbose` is present.
	Despite the default being `false` for both verbose and quiet mode,
	passing the `--quiet` option will turn off verbose mode, and `--verbose`
	will turn off quiet mode.
	This patch introduces the `flags` bit field, with `REBASE_NO_QUIET`
	as first user (with many more to come).
	We do *not* use `REBASE_QUIET` here for an important reason: To keep the
	implementation simple, this commit introduces `--no-quiet` instead of
	`--quiet`, so that a single `OPT_NEGBIT()` can turn on quiet mode and
	turn off verbose and diffstat mode at the same time. Likewise, the
	companion commit which will introduce support for `--verbose` will have
	a single `OPT_BIT()` that turns off quiet mode and turns on verbose and
	diffstat mode at the same time.

Ciao, Dscho

Previous: Junio C HamanoNext: Pratik Karki
Message 14 of 42 in “A minimal builtin rebase”
  1. Pratik KarkiAug 8, 2018
  2. 01/11 builtin rebase: support --ontoPratik Karki, Aug 8, 2018
  3. Junio C HamanoAug 8, 2018
  4. Johannes SchindelinAug 24, 2018
  5. 02/11 builtin rebase: support `git rebase --onto A...B`Pratik Karki, Aug 8, 2018
  6. Junio C HamanoAug 8, 2018
  7. Johannes SchindelinAug 26, 2018
  8. 03/11 builtin rebase: handle the pre-rebase hook (and add --no-verify)Pratik Karki, Aug 8, 2018
  9. Junio C HamanoAug 8, 2018
  10. Johannes SchindelinAug 27, 2018
  11. 04/11 builtin rebase: support --quietPratik Karki, Aug 8, 2018
  12. Stefan BellerAug 8, 2018
  13. Junio C HamanoAug 8, 2018
  14. Johannes SchindelinAug 27, 2018
  15. 05/11 builtin rebase: support the `verbose` and `diffstat` optionsPratik Karki, Aug 8, 2018
  16. 06/11 builtin rebase: require a clean worktreePratik Karki, Aug 8, 2018
  17. 07/11 builtin rebase: try to fast forward when possiblePratik Karki, Aug 8, 2018
  18. 08/11 builtin rebase: support --force-rebasePratik Karki, Aug 8, 2018
  19. Stefan BellerAug 8, 2018
  20. Johannes SchindelinAug 24, 2018
  21. 09/11 builtin rebase: start a new rebase only if none is in progressPratik Karki, Aug 8, 2018
  22. Stefan BellerAug 8, 2018
  23. Johannes SchindelinAug 24, 2018
  24. 10/11 builtin rebase: only store fully-qualified refs in `options.head_name`Pratik Karki, Aug 8, 2018
  25. 11/11 builtin rebase: support `git rebase <upstream> <switch-to>`Pratik Karki, Aug 8, 2018
  26. Duy NguyenAug 8, 2018
  27. Johannes SchindelinAug 8, 2018
  28. 00/11 A minimal builtin rebaseJohannes Schindelin via GitGitGadget, Sep 4, 2018
  29. 01/11 builtin rebase: support --ontoPratik Karki via GitGitGadget, Sep 4, 2018
  30. 02/11 builtin rebase: support `git rebase --onto A...B`Pratik Karki via GitGitGadget, Sep 4, 2018
  31. 03/11 builtin rebase: handle the pre-rebase hook and --no-verifyPratik Karki via GitGitGadget, Sep 4, 2018
  32. 04/11 builtin rebase: support --quietPratik Karki via GitGitGadget, Sep 4, 2018
  33. 05/11 builtin rebase: support the `verbose` and `diffstat` optionsPratik Karki via GitGitGadget, Sep 4, 2018
  34. 06/11 builtin rebase: require a clean worktreePratik Karki via GitGitGadget, Sep 4, 2018
  35. 07/11 builtin rebase: try to fast forward when possiblePratik Karki via GitGitGadget, Sep 4, 2018
  36. 08/11 builtin rebase: support --force-rebasePratik Karki via GitGitGadget, Sep 4, 2018
  37. 09/11 builtin rebase: start a new rebase only if none is in progressPratik Karki via GitGitGadget, Sep 4, 2018
  38. 10/11 builtin rebase: only store fully-qualified refs in `options.head_name`Pratik Karki via GitGitGadget, Sep 4, 2018
  39. SZEDER GáborSep 8, 2018
  40. Junio C HamanoSep 10, 2018
  41. SZEDER GáborSep 10, 2018
  42. 11/11 builtin rebase: support `git rebase <upstream> <switch-to>`Pratik Karki via GitGitGadget, Sep 4, 2018

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.