@@ -295,6 +295,36 @@ export class CommandCenter {
295295 return await this . model . clean ( ...this . model . workingTreeGroup . resources ) ;
296296 }
297297
298+ @CommandCenter . Command ( 'git.commitStaged' )
299+ @CommandCenter . CatchErrors
300+ async commitStaged ( ) : Promise < void > {
301+ await Promise . reject ( 'not implemented' ) ;
302+ }
303+
304+ @CommandCenter . Command ( 'git.commitStagedSigned' )
305+ @CommandCenter . CatchErrors
306+ async commitStagedSigned ( ) : Promise < void > {
307+ await Promise . reject ( 'not implemented' ) ;
308+ }
309+
310+ @CommandCenter . Command ( 'git.commitAll' )
311+ @CommandCenter . CatchErrors
312+ async commitAll ( ) : Promise < void > {
313+ await Promise . reject ( 'not implemented' ) ;
314+ }
315+
316+ @CommandCenter . Command ( 'git.commitAllSigned' )
317+ @CommandCenter . CatchErrors
318+ async commitAllSigned ( ) : Promise < void > {
319+ await Promise . reject ( 'not implemented' ) ;
320+ }
321+
322+ @CommandCenter . Command ( 'git.undoCommit' )
323+ @CommandCenter . CatchErrors
324+ async undoCommit ( ) : Promise < void > {
325+ await Promise . reject ( 'not implemented' ) ;
326+ }
327+
298328 @CommandCenter . Command ( 'git.checkout' )
299329 @CommandCenter . CatchErrors
300330 async checkout ( ) : Promise < void > {
@@ -323,34 +353,20 @@ export class CommandCenter {
323353 await choice . run ( this . model ) ;
324354 }
325355
326- @CommandCenter . Command ( 'git.commitStaged' )
327- @CommandCenter . CatchErrors
328- async commitStaged ( ) : Promise < void > {
329- await Promise . reject ( 'not implemented' ) ;
330- }
331-
332- @CommandCenter . Command ( 'git.commitStagedSigned' )
333- @CommandCenter . CatchErrors
334- async commitStagedSigned ( ) : Promise < void > {
335- await Promise . reject ( 'not implemented' ) ;
336- }
337-
338- @CommandCenter . Command ( 'git.commitAll' )
356+ @CommandCenter . Command ( 'git.branch' )
339357 @CommandCenter . CatchErrors
340- async commitAll ( ) : Promise < void > {
341- await Promise . reject ( 'not implemented' ) ;
342- }
358+ async branch ( ) : Promise < void > {
359+ const result = await window . showInputBox ( {
360+ placeHolder : 'Branch name' ,
361+ prompt : 'Please provide a branch name'
362+ } ) ;
343363
344- @CommandCenter . Command ( 'git.commitAllSigned' )
345- @CommandCenter . CatchErrors
346- async commitAllSigned ( ) : Promise < void > {
347- await Promise . reject ( 'not implemented' ) ;
348- }
364+ if ( ! result ) {
365+ return ;
366+ }
349367
350- @CommandCenter . Command ( 'git.undoCommit' )
351- @CommandCenter . CatchErrors
352- async undoCommit ( ) : Promise < void > {
353- await Promise . reject ( 'not implemented' ) ;
368+ const name = result . replace ( / ^ \. | \/ \. | \. \. | ~ | \^ | : | \/ $ | \. l o c k $ | \. l o c k \/ | \\ | \* | \s | ^ \s * $ | \. $ / g, '-' ) ;
369+ await this . model . branch ( name ) ;
354370 }
355371
356372 @CommandCenter . Command ( 'git.pull' )
0 commit comments