jtatarik / magit-gitflow

GitFlow plugin for magit.el
103 stars 12 forks source link

Does not work with the latest version of `git-flow` #22

Open Yevgnen opened 5 years ago

Yevgnen commented 5 years ago

A new version of Magit released today with a package called transient.

Creating a new feature branch seems fine however when I try to finish it, I got

user-error: Not a gitflow-enabled repo, please run ’git flow init’ first

I'm not sure if it's related to the new version of Magit. A minimal test config maybe:

(package-initialize)

(require 'magit)
(require 'magit-gitflow)

(add-hook 'magit-mode-hook 'turn-on-magit-gitflow)

Thanks!

jtatarik commented 5 years ago

Can't reproduce this with empty config and magit-20190217.2150 / magit-gitflow-2.2.3. Is this stil a problem?

Yevgnen commented 5 years ago

Hi, I'm using the same version of Magit as yours and magit-gitflow from here. Where can I find version 2.2.3?

jtatarik commented 5 years ago

As far as I know, both melpa and melpa-stable have the same version, the latest one - 20170929.824 (melpa), 2.2.3 (melpa-stable).

What I tried: created a new local repo, committed some files, initialized gitflow. Started a few feature branches, made some changes in each, then finished all of them without a hiccup.

Yevgnen commented 5 years ago

I tried something similar, Here's my test

fdsa

jtatarik commented 5 years ago

Can you upload the magit-process buffer from this little exercise ($ in the magit buffer)?

Yevgnen commented 5 years ago

Here is it:

  0 git … flow init -d
Using default branch names.
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master] 
Branch name for "next release" development: [develop] 

How to name your supporting branch prefixes?
Feature branches? [] 
Bugfix branches? [] 
Release branches? [] 
Hotfix branches? [] 
Support branches? [] 
Version tag prefix? [] 
Hooks and filters directory? [/Users/user/dotfile/emacs/iiiiii/.git/hooks] 

  0 git … flow feature start temp
Switched to a new branch 'temp'

Summary of actions:
- A new branch 'temp' was created, based on 'develop'
- You are now on branch 'temp'

Now, start committing on your feature. When done, use:

     git flow feature finish temp

  0 git … add -- a
  0 git … commit --
hint: Waiting for your editor to close the file...
Waiting for Emacs...
[temp 3b72398] Add temp.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 a

The git flow finish one is not printed...

Yevgnen commented 5 years ago

The missing git flow version is 1.12.0 (AVH Edition).

jtatarik commented 5 years ago

OK, this seems to be happening with git-flow 1.12.0, not sure why yet. 1.10.0 worked fine. Will investigate.

jtatarik commented 5 years ago

Found the problem. As a temporary workaround, try the following:

[gitflow "prefix"]
    feature = feature/
    bugfix = bugfix/
    release = release/
    hotfix = hotfix/
    support = support/
    versiontag = 

This is what the old git-flow used to do when you inited with the default values. The new version leaves the prefixes empty - and magit-gitflow gets confused into thinking gitflow has not been initialized yet.

Yevgnen commented 5 years ago

It works!

jtatarik commented 5 years ago

This is caused by https://github.com/petervanderdoes/gitflow-avh/issues/393