Skip to content
Browse files

Adding a new option, --log, which takes a single string argument and …

…pre-fills the commit log textview with it.

This can be used in cases where a commit message can be suggested or pre-generated for the user.


git-svn-id: http://svn.textmate.org/trunk/Tools/CommitWindowProject@9395 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 97d1250 commit dae08a0bf3fa1babbe9678c43a2185257df2864b @ciaran ciaran committed Apr 14, 2008
Showing with 13 additions and 0 deletions.
  1. +13 −0 CommitWindowCommandLine.m
View
13 CommitWindowCommandLine.m
@@ -56,6 +56,19 @@ - (void) awakeFromNib
argument = [args objectAtIndex:i];
[fRequestText setStringValue:argument];
}
+ else if( [argument isEqualToString:@"--log"] )
+ {
+ // Next argument should be the initial log message text.
+ if( i >= (argc - 1) )
+ {
+ fprintf(stderr, "commit window: missing text: --log \"log message text\"\n");
+ [self cancel:nil];
+ }
+
+ i += 1;
+ argument = [args objectAtIndex:i];
+ [fCommitMessage setString:argument];
+ }
else if( [argument isEqualToString:@"--status"] )
{
// Next argument should be a colon-seperated list of status strings, one for each path

0 comments on commit dae08a0

Please sign in to comment.
Something went wrong with that request. Please try again.