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
223
223
}
224
224
225
225
// 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
+ }
228
234
235
+ NSArray *parents = @[ localCommit, remoteCommit ];
229
236
GTCommit *mergeCommit = [self createCommitWithTree: mergedTree message: message parents: parents updatingReferenceNamed: localBranch.reference.name error: error];
230
237
if (!mergeCommit) {
231
238
return NO ;
You can’t perform that action at this time.
0 commit comments