[From nobody Tue May 26 11:07:06 2026
Received: (at submit) by bugs.debian.org; 14 Jun 2022 20:36:30 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.2-bugs.debian.org_2005_01_02
 (2018-09-13) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-18.0 required=4.0 tests=BAYES_00, FOURLA, HAS_PACKAGE,
 KHOP_HELO_FCRDNS,MURPHY_DRUGS_REL8,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP,
 T_SCC_BODY_TEXT_LINE,XMAILER_REPORTBUG autolearn=ham
 autolearn_force=no version=3.4.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 18; hammy, 150; neutral, 84; spammy,
 0. spammytokens: hammytokens:0.000-+--python3, 0.000-+--XDebbugsCc,
 0.000-+--X-Debbugs-Cc, 0.000-+--bookworm, 0.000-+--H*M:reportbug
Return-path: &lt;dkm+debian@kataplop.net&gt;
Received: from static-176-191-105-132.ftth.abo.bbox.fr
 ([176.191.105.132]:50476 helo=arrakis.kataplop.net)
 by buxtehude.debian.org with esmtp (Exim 4.92)
 (envelope-from &lt;dkm+debian@kataplop.net&gt;) id 1o1DH3-0002PR-Cx
 for submit@bugs.debian.org; Tue, 14 Jun 2022 20:36:30 +0000
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Marc &lt;dkm+debian@kataplop.net&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: clang-format-14: git-clang-format-14 still tries to use clang-format
 instead of clang-format-14
Message-ID: &lt;165523898564.811044.17389743233726982025.reportbug@arrakis.kataplop.net&gt;
X-Mailer: reportbug 11.5.0
Date: Tue, 14 Jun 2022 22:36:25 +0200
Delivered-To: submit@bugs.debian.org

Package: clang-format-14
Version: 1:14.0.5-1
Severity: normal
X-Debbugs-Cc: dkm+debian@kataplop.net

Dear Maintainer,

When calling:

$ git clang-format-14 HEAD

if you only have 'clang-format-14' installed, this fails with:

 error: cannot find executable &quot;clang-format&quot;

This is because the git-clang-format-14 keeps the default of calling 'clang-format'.

Calling it using --binary clang-format-14 fixes the error.

Maybe changing the default for the clang-format-* versions would avoid issues. I had several versions installed in the past and always thought that calling 'git clang-format-N' would use the correct version.

I can provide you with a patch if you want.

Thanks,
Marc
-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.17.0-trunk-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages clang-format-14 depends on:
ii  libc6           2.33-7
ii  libclang-cpp14  1:14.0.5-1
ii  libgcc-s1       12.1.0-2
ii  libllvm14       1:14.0.5-1
ii  libstdc++6      12.1.0-2
ii  python3         3.10.4-1+b1

clang-format-14 recommends no packages.

clang-format-14 suggests no packages.

-- no debconf information
]