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

Re: [PATCH] Add default merge options for all branches

From
Junio C Hamano <gitster@pobox.com>
Date
May 2, 2011, 18:23 UTC
Message-ID
<7vhb9dm06s.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4DBED99E.3050709@dailyvoid.com>
Michael Grubb <devel@dailyvoid.com> writes:
Show 5 quoted lines
> The approach taken is to make note of whether a branch specific
> mergeoptions key has been seen and only apply the global value if it
> hasn't. An alternative method would be to keep the
> branch.<branch>.mergeoptions semantics, but assign a special value for
> <branch> to be the global default.

Both my gut feeling and design taste tell me that "branch.*.mergeoptions" (using literal '*' for match-all for now) would be a lot more appropriate here. We could extend the '*' part later to take globs.

The resulting part of the configuration file would look like this:
	[branch "*"]
        	mergeoptions = ...
and later we would end up supporting other kinds of defaults, like:
	[branch "ko/*"]
        	remote = korg
	[branch "github/*"]
        	remote = github
                mergeoptions = ...

I didn't read the patch carefully but there seems to be many instances of the same "excess whitespace" pattern you should be able to avoid easily to match the style by looking at the surrounding code.

Thanks.
Previous: Junio C Hamano
Message 5 of 5 in “Add default merge options for all branches”
  1. Add default merge options for all branchesMichael Grubb, May 2, 2011
  2. Thiago FarinaMay 2, 2011
  3. Michael GrubbMay 2, 2011
  4. Junio C HamanoMay 2, 2011
  5. Junio C HamanoMay 2, 2011

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.