[GH-ISSUE #39] Explicit merge --ff is not supported, and a plain merge that would fast forward is incorrectly projected to create a merge commit #29

Closed
opened 2026-03-02 16:47:17 +03:00 by kerem · 4 comments
Owner

Originally created by @hlovdal on GitHub (Jan 27, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/39

I have a clone of the phoronix-test-suite repository with no modifications of my own and it is currently a few commits behind upstream. The following gitk screenshot shows the situation:

gitk

With git if I run git merge origin/master from this situation it will do a fast forward and just update the master branch to point to exactly the same as origin/master. When I ran git-sim merge origin/master it produced the following result:

sim

which incorrectly suggest that a merge commit would be created. If I try to force fast forward git-sim complains:

$ git-sim merge --ff origin/master
usage: git-sim [-h] [--title TITLE] [--logo LOGO] [--outro-top-text OUTRO_TOP_TEXT] [--outro-bottom-text OUTRO_BOTTOM_TEXT] [--show-intro] [--show-outro] [--media-dir MEDIA_DIR] [--low-quality] [--light-mode] [--speed SPEED]
               [--animate] [--max-branches-per-commit MAX_BRANCHES_PER_COMMIT] [--max-tags-per-commit MAX_TAGS_PER_COMMIT] [-d] [-r]
               {log,status,add,restore,commit,stash,branch,tag,reset,revert,merge,rebase,cherry-pick} ...
git-sim: error: unrecognized arguments: --ff
$

I installed (latest) git-sim for the first time today with pip, Fedora 36.

Originally created by @hlovdal on GitHub (Jan 27, 2023). Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/39 I have a clone of the [phoronix-test-suite](https://github.com/phoronix-test-suite/phoronix-test-suite/) repository with no modifications of my own and it is currently a few commits behind upstream. The following gitk screenshot shows the situation: ![gitk](https://user-images.githubusercontent.com/3678550/215203782-b1cc0c70-92b4-476a-adf8-f57f8dde6f83.png) With git if I run `git merge origin/master` from this situation it will do a fast forward and just update the `master` branch to point to exactly the same as `origin/master`. When I ran `git-sim merge origin/master` it produced the following result: ![sim](https://user-images.githubusercontent.com/3678550/215204106-c163417e-d8f5-4d39-a1ba-b7978c068458.png) which incorrectly suggest that a merge commit would be created. If I try to force fast forward git-sim complains: ```shell $ git-sim merge --ff origin/master usage: git-sim [-h] [--title TITLE] [--logo LOGO] [--outro-top-text OUTRO_TOP_TEXT] [--outro-bottom-text OUTRO_BOTTOM_TEXT] [--show-intro] [--show-outro] [--media-dir MEDIA_DIR] [--low-quality] [--light-mode] [--speed SPEED] [--animate] [--max-branches-per-commit MAX_BRANCHES_PER_COMMIT] [--max-tags-per-commit MAX_TAGS_PER_COMMIT] [-d] [-r] {log,status,add,restore,commit,stash,branch,tag,reset,revert,merge,rebase,cherry-pick} ... git-sim: error: unrecognized arguments: --ff $ ``` I installed (latest) git-sim for the first time today with pip, Fedora 36.
kerem closed this issue 2026-03-02 16:47:17 +03:00
Author
Owner

@initialcommit-io commented on GitHub (Jan 27, 2023):

@hlovdal Thanks for reporting this and for the super detailed description! I was able to reproduce this on my end - it looks like a bug when merging from a remote tracking branch. You're right it should just do the fast forward by default and if the user wants to supply the --no-ff then it will create the merge commit.

I will dig deeper today and hopefully resolve this in a new release tonight.

<!-- gh-comment-id:1407112338 --> @initialcommit-io commented on GitHub (Jan 27, 2023): @hlovdal Thanks for reporting this and for the super detailed description! I was able to reproduce this on my end - it looks like a bug when merging from a remote tracking branch. You're right it should just do the fast forward by default and if the user wants to supply the `--no-ff` then it will create the merge commit. I will dig deeper today and hopefully resolve this in a new release tonight.
Author
Owner

@initialcommit-io commented on GitHub (Jan 27, 2023):

(fyi regular fast forward merges between two non remote-tracking branches work and are something I tested, but didn't test merging a remote-tracking branch :D)

<!-- gh-comment-id:1407116205 --> @initialcommit-io commented on GitHub (Jan 27, 2023): (fyi regular fast forward merges between two non remote-tracking branches work and are something I tested, but didn't test merging a remote-tracking branch :D)
Author
Owner

@initialcommit-io commented on GitHub (Jan 28, 2023):

@hlovdal Just pushed a fix for this in git-sim 0.1.7. Remote tracking branches can now be merged as a fast-forward and remote tracking branch names will also display in commands that traverse history like git-sim log.

Please upgrade to git-sim 0.1.7 by running:

pip install git-sim --upgrade

Then test it out and let me know if it works for you! =D

<!-- gh-comment-id:1407326438 --> @initialcommit-io commented on GitHub (Jan 28, 2023): @hlovdal Just pushed a fix for this in git-sim 0.1.7. Remote tracking branches can now be merged as a fast-forward and remote tracking branch names will also display in commands that traverse history like `git-sim log`. Please upgrade to git-sim 0.1.7 by running: ``` pip install git-sim --upgrade ``` Then test it out and let me know if it works for you! =D
Author
Owner

@hlovdal commented on GitHub (Jan 28, 2023):

Looks good.

<!-- gh-comment-id:1407370677 --> @hlovdal commented on GitHub (Jan 28, 2023): Looks good.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-sim#29
No description provided.