Getting the commit message from a review without arcanist

When committing on the command line with git you need the commit message from your review. If you don’t use arcanist and you need the commit message from the Phabricator review you can simply use this little script:

---------------- ----------------
curl -s -S -d api.token=<phabricator-api-token> -d revision_id=${1:1} | jq -r ".result" -

You’ll need to get yourself an api token to replace <phabricator-api-token> from your phabricator account, to do this: Select settings


Followed Conduit API Tokens (over on the left)


Then “Generate Token”

This will generate you a new api token


That you can copy and paste that key into the above script and run it with:

./ D12345

This will output the commit message text from the review into standard out.

$ ./ D12345
[Reassociate]: Add intermediate subtract instructions created while negating to be redone later for more reassociate opportunities

This is tackling the same issue as in Reassociate is currently unable to simplify expressions such as (2 * b - (5 * a - 3 * b))
As David Majnemer pointed out, running reassociate twice did simplify the same.
Redoing the intermediate instructions created while breaking up a subtract (Negating) can open up more opportunities for reassociation and in this case simplifies the above expression to 5 * (b - a)

Reviewers: chandlerc, majnemer, dberlin, llvm-commits, mcrosier

Reviewed By: mcrosier

Subscribers: hfinkel, resistor, dberlin, mcrosier

Differential Revision:

That’s handy, thanks for sharing! I might be worth adding utilities like this to the set of utilities in the repo.