Ref T10808
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T10808: differential.querydiffs method does not provide "local:commits"
- Commits
- rPf05c3e41b9c4: Fixed localcommits include on getDiffDict
Call differential.querydiffs method and expect 'local:commits' property be added to the result.
Diff Detail
- Repository
- rP Phabricator
- Branch
- fix_localcommits
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 11720 Build 14679: arc lint + arc unit
Event Timeline
Because
>>> $a = ['hello' => []]; => [ "hello" => [] ] >>> $b = ['hello' => [1, 2, 3]]; => [ "hello" => [ 1, 2, 3 ] ] >>> $a + $b; => [ "hello" => [] ] >>> array_merge($a, $b); => [ "hello" => [ 1, 2, 3 ] ]
As written, I think this is not correct, since array_merge($a + $b) should be the same as $a + $b. You probably want array_merge($a, $b) (that is, $..., $..., not $... + $...)
array_merge() has surprising behavior when arrays contain numeric keys. I'd prefer this continue to use +, but be restructured something like this:
$dict = array(...); $authorship = ... $defaults = array('properties' => array()); return $dict + $authorship + $defaults;
Or just make getDiffAuthorshipDict() always return a (possibly empty) properties, and remove it from $dict.
Thanks! I added you to Blessed Committers so you should be able to land this (or "Land Revision") this yourself. See that project page for some instructions if you run into trouble.
(I also added you to Community, so you have a broader range of editing powers now.)