Not sure how to proceed with 'arc diff'

I’m the sole developer on a project that needs to be code reviewed using Phabricator. I’ve been using Git the whole time and everything is checked in and pushed.

I want to do the reviews one module at a time, reviewing the entire project would be too much. But I can’t figure out how to do this. A few years ago I recall I did some updates on a project that did not use Git and I did the arc diffs using the output of a diff, but I can’t seem to get that to work. arc diff --only --raw-command "diff -u empty.c process_adc.c" But that returns “Error #1”. I also recall that when I did an arc diff I would always do it with ‘–preview’ so I could look at the result before I sent it on to a review, but that does not seem to work anymore and some site said that ‘–only’ is the same.

So, some points:

  • The code-change is from nothing to something.
  • All the code is checked in and pushed
  • I want to review 1 file (c and h) at a time

I did find the instructions on how to install arcanist and that seems to be working well. I have also installed the certificate.

This question comes up every now and again - ⚓ T4348 Provide a workflow for "auditing a codebase" via Nuance or some new tool and Is it possible/easy to audit whole files? probably have the best information.

For this particular case (always “adding a file”), I think I would make some script to produce git commits of each file-pair, and arc diff each commit; Ignore the fact that it’s already checked in.

Alternatively, create a real diff for each file-pair by adding a blank line to each file, commit and arc diff that (and reset to master). You can then click show entire file in each revision, and the changes are real, so you can still update and land them if they make sense.

Or maybe just use IDE to review stuff, putting comments inline in the code.

1 Like

git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 file1 file2 | arc diff --raw --only

was the perfect solution. Found in the [Is it possible/easy to audit whole files?](https://Is it possible/easy to audit whole files?) link.