Exemple #1
0
 protected function run(\DialoGit\Dialoger $dialoger)
 {
     $picker = new \DialoGit\Picker\Stash($dialoger);
     $stash = $picker->pickOne('Pick one stash to <b>apply</b>:');
     $dialoger->dialogConfirm('Are you sure that you wish to <b>apply</b> this stash?\\n\\n' . $stash);
     $dialoger->runGit('stash apply "' . $stash . '"');
 }
Exemple #2
0
 protected function run(\DialoGit\Dialoger $dialoger)
 {
     $picker = new \DialoGit\Picker\Stash($dialoger);
     $stashes = $picker->pickMany('Pick one or more stashes to <b>drop</b>:');
     $thisThese = count($stashes) == 1 ? 'this stash' : 'these stashes';
     $dialoger->dialogConfirm('Do you wish to <b>drop</b> ' . $thisThese . ' for sure?\\n\\n' . implode("\n", $stashes));
     foreach ($stashes as $stash) {
         $dialoger->runGit('stash drop "' . $stash . '"');
     }
 }