<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang-format linter ignores arc diff argument"
href="https://bugs.llvm.org/show_bug.cgi?id=45702">45702</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-format linter ignores arc diff argument
</td>
</tr>
<tr>
<th>Product</th>
<td>Phabricator
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>thomas.preudhomme@celest.fr
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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]</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>