msysgit / git

msysGit-based Git for Windows 1.x is now superseded by Git for Windows 2.x
http://github.com/git-for-windows/git
Other
1.01k stars 317 forks source link

Octopus Merge No Fast Forward #283

Closed WORMSS closed 10 years ago

WORMSS commented 10 years ago

git version 1.9.4.msysgit.2

The output of git merge --no-ff a b c still states that the merge has done a fast forward. Consulting the log I can clearly see it has not done a fast forward. So this is purely a output bug rather than implementation.

I know windows a few versions behind v2.1.3 and I am not sure if the latest versions of git have this bug (I currently do not know how to make a build, neither do I have a *nix machine up and ready).

WORMSS@WORMSS /d/Repos/_test_octopus (master)
$ git merge a b c
Fast-forwarding to: a
Trying simple merge with b
Trying simple merge with c
Merge made by the 'octopus' strategy.
 a.txt | 0
 b.txt | 0
 c.txt | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a.txt
 create mode 100644 b.txt
 create mode 100644 c.txt

WORMSS@WORMSS /d/Repos/_test_octopus (master)
$ git log --oneline --graph
*-.   6cf37bd Merge branches 'a', 'b' and 'c'
|\ \
| | * 60301e2 c.txt
| * | 2a569d6 b.txt
| |/
* | f7ff031 a.txt
|/
* 781dc0e master.txt

I reset master.

WORMSS@WORMSS /d/Repos/_test_octopus (master)
$ git merge --no-ff a b c
Fast-forwarding to: a
Trying simple merge with b
Trying simple merge with c
Merge made by the 'octopus' strategy.
 a.txt | 0
 b.txt | 0
 c.txt | 0
 3 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a.txt
 create mode 100644 b.txt
 create mode 100644 c.txt

WORMSS@WORMSS /d/Repos/_test_octopus (master)
$ git log --oneline --graph
*---.   334d143 Merge branches 'a', 'b' and 'c'
|\ \ \
| | | * 60301e2 c.txt
| |_|/
|/| |
| | * 2a569d6 b.txt
| |/
|/|
| * f7ff031 a.txt
|/
* 781dc0e master.txt

As you can see, it still says Fast-forwarding to: a when it should not.

dscho commented 10 years ago

I know windows a few versions behind v2.1.3 and I am not sure if the latest versions of git have this bug (I currently do not know how to make a build, neither do I have a *nix machine up and ready).

Please try the Vagrant method.

WORMSS commented 10 years ago

I looked in the code, (was quicker), 2.2.0 still assumes the first merge is a fastforward.

git-merge-octopus.sh

kusma commented 10 years ago

So it seems this isn't a Windows specific issue, then? If so, this discussion should be moved to the upstream Git mailing-list.

WORMSS commented 10 years ago

Yep, sorry, just looking into the mailing list now. git/git does not have a issue tracker.. and there seems to be two for git-scm (google groups and mailing list).. So I am just researching everything now.

Thank you for your help.

dscho commented 10 years ago

I looked in the code, (was quicker), 2.2.0 still assumes the first merge is a fastforward.

I doubt it is quicker because you will have a harder time to contribute efficiently now. If you had chosen not to ignore my advice, you would probably already have a patch ready.

WORMSS commented 10 years ago

I can only just about read this code, let alone contribute a patch for it. Syntax to me is very alien. So a lot of what is going on I am guessing. I cannot even work out where --no-ff is being treated. I presume on a level above git-merge-octopus.sh but working that out is a bit harder than working out where some hardcoded output is coming from.