git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-config doc: variables sorting bug
@ 2024-02-28 10:12 Bruno Haible
  2024-02-29 19:02 ` [PATCH] docs: sort configuration variable groupings alphabetically Eric Sunshine
  2024-02-29 19:08 ` git-config doc: variables sorting bug Eric Sunshine
  0 siblings, 2 replies; 4+ messages in thread
From: Bruno Haible @ 2024-02-28 10:12 UTC (permalink / raw)
  To: git

Hi,

In https://git-scm.com/docs/git-config the variables (advice.* ...
worktree.guessRemote) are apparently meant to be in alphabetical order.

However,
  filter.<driver>.clean
  filter.<driver>.smudge
come after format.*. They should come before format.*, since 'i' < 'o'.

Bruno




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] docs: sort configuration variable groupings alphabetically
  2024-02-28 10:12 git-config doc: variables sorting bug Bruno Haible
@ 2024-02-29 19:02 ` Eric Sunshine
  2024-02-29 19:59   ` Junio C Hamano
  2024-02-29 19:08 ` git-config doc: variables sorting bug Eric Sunshine
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Sunshine @ 2024-02-29 19:02 UTC (permalink / raw)
  To: git; +Cc: Eric Sunshine, Bruno Haible

From: Eric Sunshine <sunshine@sunshineco.com>

By and large, variable groupings in Documentation/config.txt are sorted
alphabetically, though a few are not. Those outliers make it more
difficult to find a specific grouping when quickly running an eye over
the list to locate a variable of interest. Address this shortcoming by
sorting the groupings alphabetically.

NOTE: This change only sorts the top-level groupings (i.e. "core.*"
comes after "completion.*"); it does not touch the ordering of variables
within each group since variables within individual groups might
intentionally be ordered in some other fashion (such as
most-common-first or most-important-first).

Reported-by: Bruno Haible <bruno@clisp.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
---
 Documentation/config.txt | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e3a74dd1c1..782c2bab90 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -369,20 +369,18 @@ inventing new variables for use in your own tool, make sure their
 names do not conflict with those that are used by Git itself and
 other popular tools, and describe them in your documentation.
 
-include::config/advice.txt[]
-
-include::config/attr.txt[]
-
-include::config/core.txt[]
-
 include::config/add.txt[]
 
+include::config/advice.txt[]
+
 include::config/alias.txt[]
 
 include::config/am.txt[]
 
 include::config/apply.txt[]
 
+include::config/attr.txt[]
+
 include::config/blame.txt[]
 
 include::config/branch.txt[]
@@ -405,10 +403,12 @@ include::config/commit.txt[]
 
 include::config/commitgraph.txt[]
 
-include::config/credential.txt[]
-
 include::config/completion.txt[]
 
+include::config/core.txt[]
+
+include::config/credential.txt[]
+
 include::config/diff.txt[]
 
 include::config/difftool.txt[]
@@ -421,10 +421,10 @@ include::config/feature.txt[]
 
 include::config/fetch.txt[]
 
-include::config/format.txt[]
-
 include::config/filter.txt[]
 
+include::config/format.txt[]
+
 include::config/fsck.txt[]
 
 include::config/fsmonitor--daemon.txt[]
@@ -435,10 +435,10 @@ include::config/gitcvs.txt[]
 
 include::config/gitweb.txt[]
 
-include::config/grep.txt[]
-
 include::config/gpg.txt[]
 
+include::config/grep.txt[]
+
 include::config/gui.txt[]
 
 include::config/guitool.txt[]
@@ -519,10 +519,10 @@ include::config/splitindex.txt[]
 
 include::config/ssh.txt[]
 
-include::config/status.txt[]
-
 include::config/stash.txt[]
 
+include::config/status.txt[]
+
 include::config/submodule.txt[]
 
 include::config/tag.txt[]
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: git-config doc: variables sorting bug
  2024-02-28 10:12 git-config doc: variables sorting bug Bruno Haible
  2024-02-29 19:02 ` [PATCH] docs: sort configuration variable groupings alphabetically Eric Sunshine
@ 2024-02-29 19:08 ` Eric Sunshine
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Sunshine @ 2024-02-29 19:08 UTC (permalink / raw)
  To: Bruno Haible; +Cc: git

On Wed, Feb 28, 2024 at 5:15 AM Bruno Haible <bruno@clisp.org> wrote:
> In https://git-scm.com/docs/git-config the variables (advice.* ...
> worktree.guessRemote) are apparently meant to be in alphabetical order.
>
> However,
>   filter.<driver>.clean
>   filter.<driver>.smudge
> come after format.*. They should come before format.*, since 'i' < 'o'.

A possible fix has been posted here:
https://lore.kernel.org/git/20240229190229.20222-1-ericsunshine@charter.net/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] docs: sort configuration variable groupings alphabetically
  2024-02-29 19:02 ` [PATCH] docs: sort configuration variable groupings alphabetically Eric Sunshine
@ 2024-02-29 19:59   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2024-02-29 19:59 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: git, Eric Sunshine, Bruno Haible

Eric Sunshine <ericsunshine@charter.net> writes:

> NOTE: This change only sorts the top-level groupings (i.e. "core.*"
> comes after "completion.*"); it does not touch the ordering of variables
> within each group since variables within individual groups might
> intentionally be ordered in some other fashion (such as
> most-common-first or most-important-first).

I think this is a useful first step.

It is tempting to think, in this day and age, searching in a
document is so easy to start with a single keystroke (either ^F in a
browser, or '/' in a pager) that the ordering of entries does not
matter as much as it used to, but the reader may not know exactly
what variable they are looking for, and a predictable ordering helps
while they are browsing the list.

Will queue.  Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-29 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 10:12 git-config doc: variables sorting bug Bruno Haible
2024-02-29 19:02 ` [PATCH] docs: sort configuration variable groupings alphabetically Eric Sunshine
2024-02-29 19:59   ` Junio C Hamano
2024-02-29 19:08 ` git-config doc: variables sorting bug Eric Sunshine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).