From 001b6bf10eeaaf618971bc079e7415690c4c8d1a Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Thu, 25 Sep 2008 23:45:14 +0200 Subject: [PATCH] CommitView: Handle new files better This fixes the 'cat' command that was acting up and also shows information when a file could not be displayed --- PBChangedFile.m | 2 +- html/diff.html | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/PBChangedFile.m b/PBChangedFile.m index bfc971d..ebc2e46 100644 --- a/PBChangedFile.m +++ b/PBChangedFile.m @@ -23,7 +23,7 @@ - (NSString *) changes { if (status == NEW) - return [PBEasyPipe outputForCommand:@"/bin/cat" withArgs:[NSArray arrayWithObjects:@"cat-file", @"blob", path, nil] inDir:[repository workingDirectory]]; + return [PBEasyPipe outputForCommand:@"/bin/cat" withArgs:[NSArray arrayWithObject:path] inDir:[repository workingDirectory]]; else { if (cached == YES) return [repository outputInWorkdirForArguments:[NSArray arrayWithObjects:@"diff", @"--cached", @"--", path, nil]]; diff --git a/html/diff.html b/html/diff.html index ad92cd6..997c206 100644 --- a/html/diff.html +++ b/html/diff.html @@ -8,9 +8,15 @@