Fix bug with pure-git parent diff generation.

Review Request #1170 - Created Oct. 11, 2009 and submitted

Travis Vachon
RBTools
rbtools
Fix bug with pure-git parent diff generation.

When post-review is run on a pure git repository with the --parent
option, the existing code generates a parent patch without specifying
the parent branch correctly. For example, if I have a branch structure like

o master
 \
  o---o topicA
       \
        o---o topicB

and I run

post-review --parent topicA

the current code runs

>>> git diff --no-color --full-index topicA # equivalent to topicA..HEAD
>>> git diff --no-color --full-index master # equivalent to master..HEAD

which leads to errors when viewing the diff in review board.

This patch makes it so we run

>>> git diff --no-color --full-index topicA.. # equivalent to topicA..HEAD
>>> git diff --no-color --full-index master..topicA

as expected.


Loading...