From: Simon Ruderich Date: Sun, 13 Aug 2023 07:56:38 +0000 (+0200) Subject: vcs: gitconfig: sort sections by name X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=f3659d2db573444a34ff9dbd4136f71f009fca0a;p=config%2Fdotfiles.git vcs: gitconfig: sort sections by name Except for [user] which is often modified and should stay at the top. --- diff --git a/vcs/gitconfig.in b/vcs/gitconfig.in index 9efa884..b438ffd 100644 --- a/vcs/gitconfig.in +++ b/vcs/gitconfig.in @@ -1,6 +1,6 @@ # Global Git configuration file. -# Copyright (C) 2011-2018 Simon Ruderich +# Copyright (C) 2011-2023 Simon Ruderich # # This file is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,41 +20,9 @@ name = Simon Ruderich email = simon@ruderich.org -[color] - ui = auto - -[color "diff"] - # Meta information. - meta = yellow bold - # Hunk header. - frag = magenta bold - # Function in hunk header. - func = blue bold - # Removed lines. - old = red bold - # Added lines. - new = green bold - # Commit headers. - commit = cyan - -[color "grep"] - # GNU grep-like colors. - filename = magenta - linenumber = green - -[core] - editor = vim - -[pager] - # Use pager for the following commands. - status = true - tag = true - -[interactive] - # Don't require in interactive commands which require only a - # single key, for example `git add --patch`. Requires Perl module - # Term::Readkey. - singlekey = true +[advice] + # Disable annoying advice messages. + waitingForEditor = false [alias] ## Shortcuts for often used commands. @@ -165,6 +133,31 @@ done' argv0 \ | less" +[color] + ui = auto + +[color "diff"] + # Meta information. + meta = yellow bold + # Hunk header. + frag = magenta bold + # Function in hunk header. + func = blue bold + # Removed lines. + old = red bold + # Added lines. + new = green bold + # Commit headers. + commit = cyan + +[color "grep"] + # GNU grep-like colors. + filename = magenta + linenumber = green + +[core] + editor = vim + [diff] # Detect copies and renames. renames = copy @@ -206,6 +199,24 @@ #[diff "sqlite"] # textconv = sh -c 'exec sqlite3 "$@" .dump' ARGV0 +[format] + # When using git format-patch use threads and add all patches as + # replies to the first one. + thread = shallow + +[init] + # Don't create .git/hooks with any sample hooks. Reduces the clutter + # in new git repositories. + templateDir = + # Keep the default branch name + defaultBranch = master + +[interactive] + # Don't require in interactive commands which require only a + # single key, for example `git add --patch`. Requires Perl module + # Term::Readkey. + singlekey = true + [log] # Display branches/tag names in log (same as log's --decorate option). decorate = short @@ -218,10 +229,10 @@ # Merge upstream branch if `git merge` is called without arguments. defaultToUpstream = true -[rebase] - # Use single-letter command names in git rebase -i which are faster to - # change. - abbreviateCommands = true +[pager] + # Use pager for the following commands. + status = true + tag = true [push] # When running git push without a refspec push only the current @@ -229,35 +240,24 @@ # 2.0. default = simple -[format] - # When using git format-patch use threads and add all patches as - # replies to the first one. - thread = shallow - -[transfer] - # Automatically fsck objects when receiving them (respected by git - # receive-pack and git fetch (>= 1.7.8, for fetch)). - fsckObjects = true - -[advice] - # Disable annoying advice messages. - waitingForEditor = false +[rebase] + # Use single-letter command names in git rebase -i which are faster to + # change. + abbreviateCommands = true -[init] - # Don't create .git/hooks with any sample hooks. Reduces the clutter - # in new git repositories. - templateDir = - # Keep the default branch name - defaultBranch = master +[safe] + # Ignore embedded bare repositories to prevent executing arbitrary + # commands from untrusted repositories + bareRepository = explicit [tag] # Sort tags as version numbers sort = version:refname -[safe] - # Ignore embedded bare repositories to prevent executing arbitrary - # commands from untrusted repositories - bareRepository = explicit +[transfer] + # Automatically fsck objects when receiving them (respected by git + # receive-pack and git fetch (>= 1.7.8, for fetch)). + fsckObjects = true # NON-GIT SETTINGS