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

Re: [RFC] Subtle differences in passing configs to git clone

From
Jeff King <peff@peff.net>
Date
Feb 21, 2017, 17:47 UTC
Message-ID
<20170221174737.qpg6dawdvhntuikm@sigill.intra.peff.net>
In-Reply-To
<EC270E42-9431-446C-96F9-E1A0C3E45333@gmail.com>
On Tue, Feb 21, 2017 at 12:36:25PM +0100, Lars Schneider wrote:
Show 13 quoted lines
> I stumbled across the following today:
> 
> (1) git -c foo.bar="foobar" clone <URL>
> 
> --> uses the config temporarily
> 
> 
> (2) git clone -c foo.bar="foobar" <URL>
> 
> --> uses the config and writes it to .git/config
> 
> This was introduced in 84054f7 ("clone: accept config options on the 
> command line") and it makes total sense.
Yep, they were designed to match.
Show 15 quoted lines
> However, I think this subtitle difference can easily confuse users.
> 
> I think we should tell the users that we've written to .git/config.
> Maybe something like this:
> 
> git clone -c foo.bar="foobar" <URL>
> Cloning into 'test'...
> Writing foo.bar="foobar" to local config...
> remote: Counting objects: 2152, done.
> remote: Compressing objects: 100% (33/33), done.
> remote: Total 2152 (delta 19), reused 0 (delta 0), pack-reused 2119
> Receiving objects: 100% (2152/2152), 328.66 KiB | 217.00 KiB/s, done.
> Resolving deltas: 100% (1289/1289), done.
> 
> What do you think?

<shrug> I don't find it confusing, but I can see how one might. Since "clone" is already pretty chatty, I don't mind adding the extra message.

-Peff
Previous: Lars Schneider
Message 2 of 2 in “[RFC] Subtle differences in passing configs to git clone”
  1. Lars SchneiderFeb 21, 2017
  2. Jeff KingFeb 21, 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.