mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Write commit message to file
Typically, git-commit writes the commit message to .git/COMMIT_EDITMSG. This writes the commit message to that file manually to assist in hooks such as commit-msg and prepare-commit-msg which expect this file as the first argument.
This commit is contained in:
committed by
Pieter de Bie
parent
e9d45261bd
commit
897c80f8a7
@@ -289,6 +289,12 @@
|
||||
|
||||
commitSubject = [@"commit: " stringByAppendingString:commitSubject];
|
||||
|
||||
NSString *commitMessageFile;
|
||||
commitMessageFile = [repository.fileURL.path
|
||||
stringByAppendingPathComponent:@"COMMIT_EDITMSG"];
|
||||
|
||||
[commitMessage writeToFile:commitMessageFile atomically:YES encoding:NSUTF8StringEncoding error:nil];
|
||||
|
||||
self.busy++;
|
||||
self.status = @"Creating tree..";
|
||||
NSString *tree = [repository outputForCommand:@"write-tree"];
|
||||
|
||||
Reference in New Issue
Block a user