Squash commit commands fails if only one commit, that is empty, is tried to be integrated. Squash will do a fast-forward.
Not sure if this really is something we should handle, or it is a git problem. Squash shouldn't allow fast-forward according to docs.
Example on git commands
$ git init emptyCommitTest
Initialized empty Git repository in /home/user/gitlab-repos/github/pretested-integration-plugin/src/test/resources/emptyCommitTest/.git/
$ cd emptyCommitTest/
$ date > date.log
$ git add date.log
$ git commit -m "initial commit"
[master (root-commit) 01f7627] initial commit
1 file changed, 1 insertion
create mode 100644 date.log
$ git checkout -b dev
Switched to a new branch 'dev'
$ git commit -m "empty commit" --allow-empty
[dev be7178f] empty commit
$ git checkout master
Switched to branch 'master'
$ git merge --squash dev
Squash commit – not updating HEAD
*The fast-forward is a problem, as the plugin do squash as a two-step process to allow settings author*:
git merge --squash origin/ready/
git commit -
no-edit "-author=Praqma Support <firstname.lastname@example.org> 1433315668 +0200"