Permalink
Browse files

fix a indent

  • Loading branch information...
1 parent 91677bb commit 9ab88140fe90b77d0d6f869c68bdcce637b30aba @Watson1978 committed May 1, 2011
Showing with 18 additions and 18 deletions.
  1. +1 −1 git_commit/git_commit.h
  2. +2 −2 git_pull/git_pull.h
  3. +14 −14 git_pull/git_pull.m
  4. +1 −1 git_push/git_push.h
View
@@ -7,7 +7,7 @@
@interface git_commit : AMBundleAction
{
- IBOutlet id commitMessage;
+ IBOutlet id commitMessage;
}
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo;
View
@@ -11,8 +11,8 @@
@interface git_pull : AMBundleAction
{
- IBOutlet id repository;
- IBOutlet id rebase;
+ IBOutlet id repository;
+ IBOutlet id rebase;
}
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo;
View
@@ -16,34 +16,34 @@ - (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary
NSEnumerator *enumerate = [input objectEnumerator];
NSString *path = [enumerate nextObject];
NSString *repo = [repository stringValue];
- NSString *opt;
- if ([rebase state] == NSOnState) {
- opt = [[NSString alloc] initWithString:@"--rebase"];
- } else {
- opt = [[NSString alloc] initWithString:@""];
- }
+ NSString *opt;
+ if ([rebase state] == NSOnState) {
+ opt = [[NSString alloc] initWithString:@"--rebase"];
+ } else {
+ opt = [[NSString alloc] initWithString:@""];
+ }
NSString *cmd = [NSString stringWithFormat: @"PATH=/opt/local/bin:/usr/local/bin:/usr/local/git/bin:/usr/bin; git pull %@ %@", opt, repo];
- [opt release];
-
+ [opt release];
+
NSTask *task = [[NSTask alloc] init];
NSPipe *pipe = [[NSPipe alloc] init];
-
+
[task setLaunchPath: @"/bin/sh"];
[task setCurrentDirectoryPath: path];
[task setArguments: [NSArray arrayWithObjects: @"-c", cmd, nil]];
-
+
[task setStandardError: pipe];
[task launch];
-
+
NSFileHandle *handle = [pipe fileHandleForReading];
NSData *data = [handle readDataToEndOfFile];
NSString *result = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
-
- [cmd release];
+
+ [cmd release];
[task release];
[pipe release];
-
+
return input;
}
View
@@ -11,7 +11,7 @@
@interface git_push : AMBundleAction
{
- IBOutlet id repository;
+ IBOutlet id repository;
}
- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo;

0 comments on commit 9ab8814

Please sign in to comment.