Skip to content

Commit

Permalink
add a reference for the base branch in select
Browse files Browse the repository at this point in the history
  • Loading branch information
srogier committed Aug 30, 2012
1 parent 19fe26e commit c279548
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions apps/front/modules/default/actions/fileListAction.class.php
Expand Up @@ -15,8 +15,6 @@ class fileListAction extends crewAction
*/
public function execute($request)
{


$this->branch = null;
if ($request->hasParameter('name') && $request->hasParameter('repository'))
{
Expand Down
Expand Up @@ -36,6 +36,7 @@ public function configure()

$branch = $this->findCurrentBranch($this->getOption('type'), $this->getOption('id'));
$commits = $this->getGitCommand()->getCommits($branch->getRepository()->getGitDir(), $branch->getBaseBranchName(), $branch->getLastCommit());
$commits[$branch->getCommitReference()] = $branch->getBaseBranchName();

$this->setWidget('from', new sfWidgetFormSelect(array('choices' => array_reverse($commits))));
$this->setWidget('to', new sfWidgetFormSelect(array('choices' => $commits)));
Expand Down

0 comments on commit c279548

Please sign in to comment.