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

[PATCH] Pass "git config" flags in the right order

From
Karl Hasselström <kha@treskal.com>
Date
May 29, 2009, 07:43 UTC
Message-ID
<20090529074300.20591.96310.stgit@october.hq.vtech>
From: Karl Hasselström <kha@treskal.com>

New enough gits accept the --null and --list flags in any order, but older gits want --null before --list. So do it the way that's fine with everyone.

I think (but haven't verified) that git started to accept the flags in any order after commit d64ec16c2af4ddcf3985d11d5dc28a15db181de5 ("git config: reorganize to use parseopt") by Felipe Contreras on 2009-02-21, first released in git v1.6.3.

Signed-off-by: Karl Hasselström <kha@treskal.com>
---
Bug discovered by Daniel Aarno.
 stgit/config.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stgit/config.py b/stgit/config.py
index c40756c..dc9c9eb 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -48,7 +48,7 @@ class GitConfig:
         if self.__cache is not None:
             return
         self.__cache = {}
-        lines = Run('git', 'config', '--list', '--null').raw_output()
+        lines = Run('git', 'config', '--null', '--list').raw_output()
         for line in filter(None, lines.split('\0')):
             key, value = line.split('\n', 1)
             self.__cache.setdefault(key, []).append(value)
Message 1 of 1 in “Pass "git config" flags in the right order”
  1. Pass "git config" flags in the right orderKarl Hasselström, May 29, 2009

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.