Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix arc lint amend for git to not add untracked files

Arc lint for git is currently adding all untracked files when it
amends the commit with lint fixes. This changes the git add -A to be
git add -u. This only adds files that were already tracked. -A was adding
untracked files as well which was not the desired behavior here.

Test Plan:
Create an untracked file.
Commit a lint failure another file.

arc diff and choose to amend the lint patches.

Verify that the untracked file was not added but the tracked file was amended.

Reviewers: epriestley, wez, chad

Reviewed By: chad

CC: aran, Korvin

Differential Revision:
  • Loading branch information...
commit 07fba2a49b9ceb6da29fd3436dd232272acdbf2a 1 parent fb88bb9
Durham DurhamG authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/workflow/ArcanistLintWorkflow.php
2  src/workflow/ArcanistLintWorkflow.php
@@ -481,7 +481,7 @@ public function run() {
if ($amend) {
if ($repository_api instanceof ArcanistGitAPI) {
// Add the changes to the index before amending
- $repository_api->execxLocal('add -A');
+ $repository_api->execxLocal('add -u');
Please sign in to comment.
Something went wrong with that request. Please try again.