Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.5.0

Request #19605 Support for Notes or commands in succession
Submitted: 2012-09-19 02:05 UTC
From: jnovack Assigned:
Status: Open Package: VersionControl_Git (version 0.4.4)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2012-09-19 02:05 UTC] jnovack (Justin Novack)
Description: ------------ In order to get notes working I had to code the command as below. This breaks the idea and nomenclature that "notes --ref=identity add" is a command. "notes" should be the command, adding a ref should put in the correct location, and add should be a subcommand? This hugely complicates the getCommand() function. Test script: --------------- // BAD CODE $vc->getCommand('notes') ->setOption('ref', 'identity') ->subCommand('add') ->setOption('force') ->setOption('message', "$notes") ->execute(); // GOOD CODE $vc->getCommand('notes --ref=identity add') ->setOption('force') ->setOption('message', "$notes") ->execute(); Expected result: ---------------- Both commands run the same. Actual result: -------------- Because of the way the arguments and options are processed, all arguments are added first, then all options are added to the string. They need to be added in the order in which they are added to the getCommand() build.

Comments