HomePhorge

Detect changes in merge commits as the diff of the merge and the first parent

Description

Detect changes in merge commits as the diff of the merge and the first parent

Summary:
Currently, we use "git log" to detect the change list for all commits, but this produces no output for merge commits.

Instead, parse them as changes against the first parent (the merge destination). This produces generally sensible/expected behavior, and is consistent with what GitHub does.

We need to special-case the first commit because it doesn't have parents.

NOTE: This is a parser change so you need to run ./scripts/repository/reparse.php --all <callsign> --change to reparse merge commits in already-imported repositories after updating.

Test Plan: Reparsed a merge commit, a non-merge commit, and the first commit in the Phabricator repository.

Reviewers: btrahan, gschmidt

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T961

Differential Revision: https://secure.phabricator.com/D1985

Details

Provenance
epriestleyAuthored on Mar 21 2012, 5:10 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP33bce2771830: Allow Maniphest reports to be sorted, filtered by project, and have adjustable…
Branches
Unknown
Tags
Unknown

Event Timeline