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

Re: [PATCH] scalar: accept -C and -c options before the subcommand

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jan 27, 2022, 02:55 UTC
Message-ID
<220127.86v8y5dgus.gmgdl@evledraar.gmail.com>
In-Reply-To
<pull.1130.git.1643195729608.gitgitgadget@gmail.com>
On Wed, Jan 26 2022, Johannes Schindelin via GitGitGadget wrote:
Show 23 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> The `git` executable has these two very useful options:
>
> -C <directory>:
> 	switch to the specified directory before performing any actions
>
> -c <key>=<value>:
> 	temporarily configure this setting for the duration of the
> 	specified scalar subcommand
>
> With this commit, we teach the `scalar` executable the same trick.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>     scalar: accept -C and -c options
>     
>     This makes the scalar command a bit more handy by offering the same -c
>     <key>=<value> and -C <directory> options as the git command.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1130%2Fdscho%2Fscalar-c-and-C-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1130/dscho/scalar-c-and-C-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1130

I think it would help for context to note that this patch had at least 6 submissions on the ML already as part of early versions of the scalar series.

Here's the CL of the iteration that ejected it: https://lore.kernel.org/git/pull.1005.v7.git.1637158762.gitgitgadget@gmail.com/

Where you summarized:
    
     * The patch that adds support for -c <key>=<value> and -C <directory> was
       moved to its own add-on patch series: While it is obvious that those
       options are valuable to have, an open question is whether there are other
       "pre-command" options in git that would be useful, too, and I would like
       to postpone that discussion to that date.

Having been involved in those discussions I can't remember what the pre-command options you're referring to there are, but it seems "that date" is probably upon us.

Previous: Johannes SchindelinNext: Derrick Stolee
Message 4 of 14 in “scalar: accept -C and -c options before the subcommand”
  1. scalar: accept -C and -c options before the subcommandJohannes Schindelin via GitGitGadget, Jan 26, 2022
  2. Taylor BlauJan 26, 2022
  3. Johannes SchindelinJan 28, 2022
  4. Ævar Arnfjörð BjarmasonJan 27, 2022
  5. Derrick StoleeJan 27, 2022
  6. Johannes SchindelinJan 28, 2022
  7. Ævar Arnfjörð BjarmasonJan 28, 2022
  8. Derrick StoleeJan 28, 2022
  9. Ævar Arnfjörð BjarmasonJan 29, 2022
  10. Derrick StoleeJan 28, 2022
  11. Junio C HamanoJan 28, 2022
  12. Derrick StoleeJan 28, 2022
  13. scalar: accept -C and -c options before the subcommandJohannes Schindelin via GitGitGadget, Jan 28, 2022
  14. Derrick StoleeJan 28, 2022

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.