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

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

Open
Yevgnen opened this issue Feb 15, 2019 · 11 comments
Open

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

Yevgnen opened this issue Feb 15, 2019 · 11 comments

Comments

@Yevgnen
Copy link

Yevgnen commented Feb 15, 2019

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
Copy link
Owner

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

@Yevgnen
Copy link
Author

Yevgnen commented Feb 18, 2019

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
Copy link
Owner

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
Copy link
Author

Yevgnen commented Feb 18, 2019

I tried something similar, Here's my test

fdsa

  • Magit 20190217.2150
  • Git 2.20.1
  • Emacs 26.1.90, darwin
  • 20170929.824

@jtatarik
Copy link
Owner

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

@Yevgnen
Copy link
Author

Yevgnen commented Feb 18, 2019

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
Copy link
Author

Yevgnen commented Feb 18, 2019

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

@jtatarik
Copy link
Owner

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

@jtatarik jtatarik changed the title Does not work with the latest version of Magit Does not work with the latest version of git-flow Feb 19, 2019
@jtatarik
Copy link
Owner

jtatarik commented Feb 19, 2019

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

  • open your .git/config
  • find the [gitflow "prefix"] section
  • specify the branch prefix names explicitly, like so
[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
Copy link
Author

Yevgnen commented Feb 20, 2019

It works!

@jtatarik
Copy link
Owner

This is caused by petervanderdoes/gitflow-avh#393

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