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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

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 <[email protected]> ---
*** 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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to