Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include both commit messages in squash #16

Merged
merged 1 commit into from
Sep 27, 2015
Merged

Include both commit messages in squash #16

merged 1 commit into from
Sep 27, 2015

Conversation

sephlietz
Copy link
Contributor

Squash With Parent populates the commit message with the squashed
commit's message and its parent's commit message. This is similar to
the way 'git rebase --interactive' works.

Resolves: http://forums.gitup.co/t/squash-with-parent-should-include-both-commit-messages/315

screen shot 2015-09-21 at 11 24 56 pm

Squash With Parent populates the commit message with the squashed
commit's message and its parent's commit message. This is similar to
the way 'git rebase --interactive' works.

Resolves: http://forums.gitup.co/t/squash-with-parent-should-include-both-commit-messages/315
@@ -225,7 +225,9 @@ - (void)swapCommitWithChild:(GCHistoryCommit*)commit {

- (void)squashCommitWithParent:(GCHistoryCommit*)commit {
if ([self checkCleanRepositoryForOperationOnCommit:commit]) {
[self _promptForCommitMessage:_CleanedUpCommitMessage(commit.message)
GCHistoryCommit* parentCommit = commit.parents.firstObject;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the commit has no parent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the GitUp UI, the "Squash With Parent" action is disabled when a commit does not have a parent. Outside of GitUp usage this of course result in an error but I believe there are other places that assume commit.parents will be non-null.

swisspol added a commit that referenced this pull request Sep 27, 2015
Include both commit messages in squash
@swisspol swisspol merged commit 9c3f4aa into git-up:master Sep 27, 2015
@swisspol
Copy link
Contributor

All good then, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants