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.