[llvm-bugs] [Bug 45702] New: clang-format linter ignores arc diff argument
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Apr 27 10:10:49 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45702
Bug ID: 45702
Summary: clang-format linter ignores arc diff argument
Product: Phabricator
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: thomas.preudhomme at celest.fr
CC: llvm-bugs at lists.llvm.org
utils/arcanist/clang-format.sh finds the diff base using arc which --show-base.
However this ignores the argument passed to arc diff if any. If the default
start revision is set to origin/master as suggested by phabricator [1] then the
linter will lint everything changed between origin/master and HEAD. This can be
particularly annoying if working on another branch than master (e.g. a stable
branch).
It also causes the linter to fail with a non obvious message when that default
was never set due to always using arc diff with an argument:
"The program is attempting to read user input, but stdin is being piped from
some other source (not a TTY)."
[1] Message when running arc diff for the first time without argument:
Select a Default Commit Range
You're running a command which operates on a range of revisions (usually,
from some revision to HEAD) but have not specified the revision that should
determine the start of the range.
Previously, arc assumed you meant 'HEAD^' when you did not specify a start
revision, but this behavior does not make much sense in most workflows
outside of Facebook's historic git-svn workflow.
arc no longer assumes 'HEAD^'. You must specify a relative commit explicitly
when you invoke a command (e.g., `arc diff HEAD^`, not just `arc diff`) or
select a default for this working copy.
In most cases, the best default is 'origin/master'. You can also select
'HEAD^' to preserve the old behavior, or some other remote or branch. But you
almost certainly want to select 'origin/master'.
(Technically: the merge-base of the selected revision and HEAD is used to
determine the start of the commit range.)
What default do you want to use? [origin/master]
--
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/20200427/c76b0103/attachment-0001.html>
More information about the llvm-bugs
mailing list