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

Re: [RFC 1/2] Use remote information in .git/config

From
Junio C Hamano <junkio@cox.net>
Date
Nov 21, 2005, 19:29 UTC
Message-ID
<7v4q65sst3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0511211452470.13775@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 10 quoted lines
> This patch allows to store shortcuts for fetch/pull into the config:
>
> 	[remote.junio]
> 		url = http://www.kernel.org/pub/scm/git/git.git
> 		pull = master:junio
> 		pull = todo:todo
> 		pull = +pu:pu
>
> Note that there is only one pair per "pull" line, to allow for spaces
> (urgh!) in the branch names.

I think "allow for spaces" nonsense can be removed by now. I did it initially that way before making the ref name validation tighter with check-ref-format. And if I understand what you wrote about multivalues correctly, your intent is that "orders do not matter"; with pull refspecs, orders do matter, so it probably is a good idea to allow only a single line.

Personally I do not mind moving remotes/branches information there, except that I suspect the git-config-set interface makes it cumbersome to (1) find out what remotes I defined (i.e. an equivalent of "ls .git/remotes") and (2) remove a single remote when I do not want it anymore (--unset-all would remove the keys but would leave the empty section).

I am unsure if putting everything in .git/config file is the right approach, though. What will we put there next? ls-files ignore patterns? grafts? alternates? We should be able to even get rid of .git/refs directory hierarchy and replace that with something like this:

	[refs]
        	head = ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234	for master
        	head = ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234	for pu
		tag = ABCD1234ABCD1234ABCD1234ABCD1234ABCD1234 for v1.0rc1
	...
Where will we stop, and why?

I am worried about people later asking "why do we have X in config but not Y"?

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 8 in “[RFC 1/2] Use remote information in .git/config”
  1. Johannes SchindelinNov 21, 2005
  2. Junio C HamanoNov 21, 2005
  3. Johannes SchindelinNov 21, 2005
  4. Junio C HamanoNov 22, 2005
  5. Johannes SchindelinNov 22, 2005
  6. Ben CliffordNov 24, 2005
  7. Johannes SchindelinNov 25, 2005
  8. Petr BaudisNov 27, 2005

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.