[llvm-bugs] [Bug 46044] 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=46044

            Bug ID: 46044
           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: RESOLVED
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: xerusx at pm.me
                CC: djasper at google.com, Jake.Merdich at amd.com,
                    klimek at google.com, llvm-bugs at lists.llvm.org
        Resolution: DUPLICATE
                CC: Jake.Merdich at amd.com
            Status: RESOLVED

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> ---
This seems to have double-posted. Tracking in one issue.

*** This bug has been marked as a duplicate of bug 46043 ***

-- 
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/084e8f58/attachment-0001.html>


More information about the llvm-bugs mailing list