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

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

Closed
hlovdal opened this issue Jan 27, 2023 · 4 comments

Comments

@hlovdal
Copy link

hlovdal commented Jan 27, 2023

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.

@initialcommit-io
Copy link
Contributor

@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.

@initialcommit-io
Copy link
Contributor

(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)

@initialcommit-io
Copy link
Contributor

@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

@hlovdal
Copy link
Author

hlovdal commented Jan 28, 2023

Looks good.

@hlovdal hlovdal closed this as completed Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants