Guest User

Untitled

a guest
Feb 21st, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. From 22800c8fd3075a7770cb874ba4545e839ac32720 Mon Sep 17 00:00:00 2001
  2. From: Pieter de Bie <pdebie@ai.rug.nl>
  3. Date: Wed, 19 Nov 2008 14:35:48 +0100
  4. Subject: [PATCH] Revert "Merge branch 'master' of git://github.com/bkerley/gitx"
  5.  
  6. This reverts commit 66f3588b778fab412ba03435b3c8906ae2802743.
  7.  
  8. Conflicts:
  9.  
  10. PBGitRevList.m
  11. ---
  12. PBEasyPipe.h | 1 -
  13. PBEasyPipe.m | 2 +-
  14. PBGitCommit.m | 5 +++--
  15. PBGitRevList.m | 5 +----
  16. 4 files changed, 5 insertions(+), 8 deletions(-)
  17.  
  18. diff --git a/PBEasyPipe.h b/PBEasyPipe.h
  19. index 03b80b9..8b15646 100644
  20. --- a/PBEasyPipe.h
  21. +++ b/PBEasyPipe.h
  22. @@ -12,7 +12,6 @@
  23. @interface PBEasyPipe : NSObject {
  24.  
  25. }
  26. -+ (NSTask *) taskForCommand:(NSString *)cmd withArgs:(NSArray *)args inDir:(NSString *)dir;
  27.  
  28. + (NSFileHandle*) handleForCommand: (NSString*) cmd withArgs: (NSArray*) args;
  29. + (NSFileHandle*) handleForCommand: (NSString*) cmd withArgs: (NSArray*) args inDir: (NSString*) dir;
  30. diff --git a/PBEasyPipe.m b/PBEasyPipe.m
  31. index b18c12e..1fe7f37 100644
  32. --- a/PBEasyPipe.m
  33. +++ b/PBEasyPipe.m
  34. @@ -106,7 +106,7 @@
  35.  
  36. NSData* data = [handle readDataToEndOfFile];
  37. NSString* string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  38. - [task waitUntilExit];
  39. +
  40. // Strip trailing newline
  41. if ([string hasSuffix:@"\n"])
  42. string = [string substringToIndex:[string length]-1];
  43. diff --git a/PBGitCommit.m b/PBGitCommit.m
  44. index f38bf43..8e9a50d 100644
  45. --- a/PBGitCommit.m
  46. +++ b/PBGitCommit.m
  47. @@ -40,8 +40,9 @@
  48. if (details != nil)
  49. return details;
  50.  
  51. - details = [self.repository outputForCommand:[@"show --pretty=raw " stringByAppendingString:self.sha]];
  52. -
  53. + NSFileHandle* handle = [self.repository handleForCommand:[@"show --pretty=raw " stringByAppendingString:self.sha]];
  54. + details = [[NSString alloc] initWithData:[handle readDataToEndOfFile] encoding: NSUTF8StringEncoding];
  55. +
  56. return details;
  57. }
  58.  
  59. diff --git a/PBGitRevList.m b/PBGitRevList.m
  60. index b4d37ec..98922e8 100644
  61. --- a/PBGitRevList.m
  62. +++ b/PBGitRevList.m
  63. @@ -82,9 +82,7 @@
  64. if ([rev hasPathLimiter])
  65. [arguments insertObject:@"--children" atIndex:1];
  66.  
  67. - NSTask *task = [PBEasyPipe taskForCommand:[PBGitBinary path] withArgs:arguments inDir:[repository fileURL].path];
  68. - [task launch];
  69. - NSFileHandle* handle = [task.standardOutput fileHandleForReading];
  70. + NSFileHandle* handle = [repository handleForArguments: arguments];
  71.  
  72. int fd = [handle fileDescriptor];
  73. FILE* f = fdopen(fd, "r");
  74. @@ -149,7 +147,6 @@
  75.  
  76. // Make sure the commits are stored before exiting.
  77. [self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:YES];
  78. - [task waitUntilExit];
  79. }
  80.  
  81. @end
  82. --
  83. 1.6.0.3.875.g5bf73+GitX
Add Comment
Please, Sign In to add comment