| 
														
															@@ -8,7 +8,7 @@ use Log::Log4perl qw(:easy); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 # TODO: This needs to be scoped properly 
														 | 
														
														 | 
														
															 # TODO: This needs to be scoped properly 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 use lib "/usr/local/lib"; 
														 | 
														
														 | 
														
															 use lib "/usr/local/lib"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 use SimplyGit::Shellex qw(shellex findBin); 
														 | 
														
														 | 
														
															 use SimplyGit::Shellex qw(shellex findBin); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-use SimplyGit::Git qw(readConfig getStatus returnState addFiles commitChanges pushChanges); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+use SimplyGit::Git qw(readConfig getStatus returnState addFiles commitChanges pushChanges stashAndReset); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 if ( ! -d ".git" ) { 
														 | 
														
														 | 
														
															 if ( ! -d ".git" ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	print "Not a git dir, exiting...\n"; 
														 | 
														
														 | 
														
															 	print "Not a git dir, exiting...\n"; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -60,6 +60,7 @@ GetOptions( 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	'view', 
														 | 
														
														 | 
														
															 	'view', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	'reset-from-master', 
														 | 
														
														 | 
														
															 	'reset-from-master', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	'branch-from-master', 
														 | 
														
														 | 
														
															 	'branch-from-master', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	'commit-msg=s', 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 ); 
														 | 
														
														 | 
														
															 ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 sub printHelp { 
														 | 
														
														 | 
														
															 sub printHelp { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -70,8 +71,10 @@ Usage: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	--view 
														 | 
														
														 | 
														
															 	--view 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	Display git status of files and other information 
														 | 
														
														 | 
														
															 	Display git status of files and other information 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	--push-all 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	Push all untracked and modified files (can be used with interactive mode) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	--push-all [--commit-msg] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	Push all untracked and modified files  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		* (can be used with interactive mode) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		* can provide a commit msg with --commit-msg (otherwise a generic will be provided) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	--interactive 
														 | 
														
														 | 
														
															 	--interactive 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	Enable interactive mode with supported opts 
														 | 
														
														 | 
														
															 	Enable interactive mode with supported opts 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -183,11 +186,14 @@ if ( defined $args{'push-all'} ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	 
														 | 
														
														 | 
														
															 	 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	addFiles(\@filesToCommit,$logger); 
														 | 
														
														 | 
														
															 	addFiles(\@filesToCommit,$logger); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-	if ( defined $args{'interactive'} ) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	if ( defined $args{'interactive'} && ! defined $args{'commit-msg'}) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		print "Enter a commit message: "; 
														 | 
														
														 | 
														
															 		print "Enter a commit message: "; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		my $input = <STDIN>; 
														 | 
														
														 | 
														
															 		my $input = <STDIN>; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		chomp $input; 
														 | 
														
														 | 
														
															 		chomp $input; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		commitChanges($input,$logger); 
														 | 
														
														 | 
														
															 		commitChanges($input,$logger); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	} elsif ( defined $args{'commit-msg'} ) {  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		my $commitMsg = "$args{'commit-msg'}"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+		commitChanges($commitMsg,$logger); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 	} else { 
														 | 
														
														 | 
														
															 	} else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		my $epoch = time(); 
														 | 
														
														 | 
														
															 		my $epoch = time(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 		my $commitMsg = "Generic Commit at $epoch"; 
														 | 
														
														 | 
														
															 		my $commitMsg = "Generic Commit at $epoch"; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -217,3 +223,9 @@ if ( defined $args{'push-all'} ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 } 
														 | 
														
														 | 
														
															 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+if ( defined $args{'reset-from-master'} ) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+	stashAndReset($logger); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+} 
														 |