git - arc diff - and a new project

339 Views Asked by At

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 diff's 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.

1

There are 1 best solutions below

1
MattR On

I found the answer on the [https://discourse.phabricator-community.org] site after posting the question. This is not really what phabricator is meant for, but there is a hack to get around it. The hack works because of a trick with git. Here is the command line: git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 file1.c ../Inc/file1.h | arc diff --raw --only It works because 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a special number, I forget the details. But this produced exactly what I needed.