[llvm-bugs] [Bug 46043] New: git-clang-format script fails reading the git config if there is an option without a value

via llvm-bugs llvm-bugs at lists.llvm.org
Sat May 23 19:34:37 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46043

            Bug ID: 46043
           Summary: git-clang-format script fails reading the git config
                    if there is an option without a value
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xerusx at pm.me
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

The git-clang-format python script fails reading the git config if there is an
option without a value, which according to
https://git-scm.com/docs/git-config#_syntax is an acceptable format:
"[Set variables] in the form name = value (or just name, which is a short-hand
to say that the variable is the boolean "true")"

The error:
```
❯ git clang-format
Traceback (most recent call last):
  File "/usr/bin/git-clang-format", line 579, in <module>
    main()
  File "/usr/bin/git-clang-format", line 61, in main
    config = load_git_config()
  File "/usr/bin/git-clang-format", line 194, in load_git_config
    name, value = entry.split('\n', 1)
ValueError: need more than 1 value to unpack
```

I currently use clang-format-9 on KDE Neon (based on Ubuntu 18 LTS)

--- Comment #1 from Jake Merdich <Jake.Merdich at amd.com> ---
*** Bug 46044 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200524/effca4ec/attachment-0001.html>


More information about the llvm-bugs mailing list