Skip to content

Commit 9c3f4aa

Browse files
committed
Merge pull request #16 from sephlietz/squash-with-both-messages
Include both commit messages in squash
2 parents 4c12592 + d134ec9 commit 9c3f4aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

GitUpKit/Views/GIMapViewController+Operations.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ - (void)swapCommitWithChild:(GCHistoryCommit*)commit {
225225

226226
- (void)squashCommitWithParent:(GCHistoryCommit*)commit {
227227
if ([self checkCleanRepositoryForOperationOnCommit:commit]) {
228-
[self _promptForCommitMessage:_CleanedUpCommitMessage(commit.message)
228+
GCHistoryCommit* parentCommit = commit.parents.firstObject;
229+
NSString* mergedMessage = [NSString stringWithFormat:NSLocalizedString(@"%@\n\n%@", nil), _CleanedUpCommitMessage(parentCommit.message), _CleanedUpCommitMessage(commit.message)];
230+
[self _promptForCommitMessage:mergedMessage
229231
withTitle:NSLocalizedString(@"Squashed commit message:", nil)
230232
button:NSLocalizedString(@"Squash", nil)
231233
block:^(NSString* message) {

0 commit comments

Comments
 (0)