File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -223,9 +223,16 @@ - (BOOL)mergeBranchIntoCurrentBranch:(GTBranch *)branch withError:(NSError **)er
223223 }
224224
225225 // Create merge commit
226- NSString *message = [NSString stringWithFormat: @" Merge branch '%@ '" , localBranch.shortName];
227- NSArray *parents = @[ localCommit, remoteCommit ];
226+ NSError *mergeMsgError = nil ;
227+ NSURL *mergeMsgFile = [[self gitDirectoryURL ] URLByAppendingPathComponent: @" MERGE_MSG" ];
228+ NSString *message = [NSString stringWithContentsOfURL: mergeMsgFile
229+ encoding: NSUTF8StringEncoding
230+ error: &mergeMsgError];
231+ if (!message) {
232+ message = [NSString stringWithFormat: @" Merge branch '%@ '" , localBranch.shortName];
233+ }
228234
235+ NSArray *parents = @[ localCommit, remoteCommit ];
229236 GTCommit *mergeCommit = [self createCommitWithTree: mergedTree message: message parents: parents updatingReferenceNamed: localBranch.reference.name error: error];
230237 if (!mergeCommit) {
231238 return NO ;
You can’t perform that action at this time.
0 commit comments