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

Re: What's cooking in git.git (Apr 2018, #02; Tue, 17)

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 22, 2018, 20:17 UTC
Message-ID
<20180422201755.GA92212@syl.local>
In-Reply-To
<xmqqzi22tlfx.fsf@gitster-ct.c.googlers.com>
On Tue, Apr 17, 2018 at 03:07:46PM +0900, Junio C Hamano wrote:
Show 29 quoted lines
> * tb/config-type (2018-04-10) 2 commits
>  - builtin/config.c: support `--type=<type>` as preferred alias for `--<type>`
>  - builtin/config.c: treat type specifiers singularly
>  (this branch is used by tb/config-default.)
>
>  The "git config" command uses separate options e.g. "--int",
>  "--bool", etc. to specify what type the caller wants the value to
>  be interpreted as.  A new "--type=<typename>" option has been
>  introduced, which would make it cleaner to define new types.
>
>  Expecting a final reroll.
>  cf. <20180411034941.GA63158@syl.local>
>  This looked more or less ready, IIRC
>
>
> * tb/config-default (2018-04-10) 3 commits
>  - builtin/config: introduce `color` type specifier
>  - config.c: introduce 'git_config_color' to parse ANSI colors
>  - builtin/config: introduce `--default`
>  (this branch uses tb/config-type.)
>
>  "git config --get" learned the "--default" option, to help the
>  calling script.  Building on top of the tb/config-type topic, the
>  "git config" learns "--type=color" type.  Taken together, you can
>  do things like "git config --get foo.color --default blue" and get
>  the ANSI color sequence for the color given to foo.color variable,
>  or "blue" if the variable does not exist.
>
>  Will wait on the tb/config-type topic.
Hi Junio,

Thank you for picking up both of these topics. I sent a final reroll to tb/config-type, which I see has made it successfully to 'pu'.

I noticed that tb/config-default, however, only landed two commits:
  - builtin/config: introduce `color` type specifier
  - config.c: introduce 'git_config_color' to parse ANSI colors
but not:
  - builtin/config: introduce `--default`

As such, I am able to build on 'pu', but the `--default` option is missing:

  ~/g/git (pu) $ ./git-config --type=color --default red core.doesntexist
  error: unknown option `default'
Please advise.

Thanks, Taylor

Previous: Johannes SchindelinNext: Junio C Hamano
Message 15 of 18 in “What's cooking in git.git (Apr 2018, #02; Tue, 17)”
  1. Junio C HamanoApr 17, 2018
  2. Eric SunshineApr 17, 2018
  3. Stefan BellerApr 17, 2018
  4. Junio C HamanoApr 18, 2018
  5. Derrick StoleeApr 18, 2018
  6. Junio C HamanoApr 18, 2018
  7. Jonathan TanApr 18, 2018
  8. Junio C HamanoApr 18, 2018
  9. Christian HesseApr 18, 2018
  10. Junio C HamanoApr 18, 2018
  11. Elijah NewrenApr 18, 2018
  12. Junio C HamanoApr 18, 2018
  13. Sergey OrganovApr 19, 2018
  14. js/rebase-recreate-merges, was Re: What's cooking in git.git (Apr 2018, #02; Tue, 17)Johannes Schindelin, Apr 20, 2018
  15. Taylor BlauApr 22, 2018
  16. Junio C HamanoApr 22, 2018
  17. Taylor BlauApr 22, 2018
  18. Junio C HamanoApr 23, 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.