jtatarik / magit-gitflow Goto Github PK
View Code? Open in Web Editor NEWGitFlow plugin for magit.el
GitFlow plugin for magit.el
magit-gitflow does not respect preconfigured values of flags.
For example: I added gitflow.release.finish.push = yes to git configuration.
Magit-gitflow does not test this value and --push option is inactive, while it should be marked as active automatically.
This snippet from the output of pstree -p
shows what is going on:
emacs(4178)-+
|-git(10757)---git-flow(10758)---git(10897)---git-rebase(10898)---emacsclient(10982)
The problem seems to be that magit-gitflow
runs everything synchronously, but because I have set my EDITOR
environment variable to emacsclient
, the whole things is circular and hangs.
(require 'magit-process) didn't work. where to find it ?
I recently added a git-flow-enabled repo to a new computer, where I continued work on a feature branch that I had started elsewhere. When I went to finish the feature (C-f f f f), I got this error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
compare-strings(nil 0 0 "feature/foo" 0 0 nil)
string-prefix-p(nil "feature/foo")
(if (string-prefix-p prefix current-branch) (substring current-branch (length prefix)) "")
(let* ((prefix (magit-get "gitflow.prefix.feature")) (current-branch (magit-get-current-branch)) (current-feature (if (string-prefix-p prefix current-branch) (substring current-branch (length prefix)) ""))) (magit-run-gitflow "feature" args magit-current-popup-args (string-remove-prefix prefix (magit-completing-read "Feature name" (magit-list-refnames "refs/heads") (function (lambda (ref) (string-prefix-p prefix ref))) t current-branch))))
magit-run-gitflow-feature("finish")
magit-gitflow-feature-finish()
funcall-interactively(magit-gitflow-feature-finish)
#<subr call-interactively>(magit-gitflow-feature-finish nil nil)
ad-Advice-call-interactively(#<subr call-interactively> magit-gitflow-feature-finish)
apply(ad-Advice-call-interactively #<subr call-interactively> magit-gitflow-feature-finish)
call-interactively(magit-gitflow-feature-finish)
(let* ((magit-current-popup magit-this-popup) (magit-current-popup-args (magit-popup-get-args)) (command (progn nil (or (progn nil (and (vectorp ...) (>= ... 7) (memq ... cl-struct-magit-popup-event-tags) t)) (signal (quote wrong-type-argument) (list (quote magit-popup-event) (or action variable)))) (aref (or action variable) 4))) (magit-current-popup-action command)) (if action (progn (magit-popup-quit))) (call-interactively command) (setq this-command command) (if action nil (magit-refresh-popup-buffer)))
(if (or action variable) (let* ((magit-current-popup magit-this-popup) (magit-current-popup-args (magit-popup-get-args)) (command (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... ...))) (aref (or action variable) 4))) (magit-current-popup-action command)) (if action (progn (magit-popup-quit))) (call-interactively command) (setq this-command command) (if action nil (magit-refresh-popup-buffer))) (if (eq event 113) (progn (magit-popup-quit) (if magit-previous-popup (progn (magit-popup-mode-setup magit-previous-popup nil)))) (user-error "%c isn't bound to any action" event)))
(let ((action (magit-popup-lookup event :actions)) (variable (magit-popup-lookup event :variables))) (if (and variable (not (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... variable))) (aref variable 3)))) (progn (setq action variable) (setq variable nil))) (if (or action variable) (let* ((magit-current-popup magit-this-popup) (magit-current-popup-args (magit-popup-get-args)) (command (progn nil (or (progn nil ...) (signal ... ...)) (aref (or action variable) 4))) (magit-current-popup-action command)) (if action (progn (magit-popup-quit))) (call-interactively command) (setq this-command command) (if action nil (magit-refresh-popup-buffer))) (if (eq event 113) (progn (magit-popup-quit) (if magit-previous-popup (progn (magit-popup-mode-setup magit-previous-popup nil)))) (user-error "%c isn't bound to any action" event))))
magit-invoke-popup-action(102)
funcall-interactively(magit-invoke-popup-action 102)
#<subr call-interactively>(magit-invoke-popup-action nil nil)
ad-Advice-call-interactively(#<subr call-interactively> magit-invoke-popup-action nil nil)
apply(ad-Advice-call-interactively #<subr call-interactively> (magit-invoke-popup-action nil nil))
call-interactively(magit-invoke-popup-action nil nil)
command-execute(magit-invoke-popup-action)
Eventually I realized that I had not yet run git flow init
on my new copy of the repo.
I realize this is a bit of an edge case, but it would be nice to have a friendlier error message here.
I created one feature using magit-gitflow. I then attempted to publish it. It prompted me for which feature branch to publish, and defaulted to the current feature branch, but without the branch prefix (feature/
, the default), so when I pressed TAB it said "No completions". I had to delete it and retype it with feature/
at the start - then it worked.
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!
hi there,
whenever i try to finish a feature/hotfix/release i get a getopt error:
1 git --no-pager -c core.preloadindex=true flow --cleanup=strip --file=.git/COMMIT_EDITMSG hotfix finish fix-html
flags:WARN getopt: unrecognized option '--cleanup=strip'
getopt: unrecognized option '--file=.git/COMMIT_EDITMSG'
-- 'hotfix' 'finish' 'fix-html'
flags:FATAL unable to parse provided options with getopt.
am i doing something wrong?
the cli works fine:
git flow hotfix finish fix-html
output:
Summary of actions:
emacs: 24.4.1
git: 1.9.3 (Apple Git-50)
magit: 20150124.930
magit-gitflow: 20140512.1437
-mp-
I'm getting this error when attempting to use this module:
'flow' is not a git command. See 'git --help'. ...
I mean, it seems to work fine and the menu system is taking me through the motions, but once I've typed the name of the feature and hit Enter I get the above error.
I use: Magit 20150701.1326, Git 2.4.5, Emacs 24.5.1
Currently it's bound to C-f
by default. I propose to change the default to something else, since it's a motion key. And whenever I navigate in magit status buffer I end up opening gitflow popup.
I am not sure what's the best key binding would be for that, that's why I am opening issue :)
Best regards.
I get:
Debugger entered--Lisp error: (void-variable magit-gitflow-popup)
magit-define-popup
have been removed at magit 2.1.0.
Arch Linux kernel version 3.18.6-1-ARCH
GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.7) of 2015-01-17 on bisson
magit-1.2.0-752-g0bb8e79
git version 2.3.0
git-flow version 0.4.1
(require 'magit-gitflow)
produces:
Debugger entered--Lisp error: (wrong-type-argument consp nil)
setcdr(nil (("=u" "Signing key" "--signingkey=" read-file-name)))
(if (cdr things) (if (magit-key-mode-key-defined-p for-group key) (error "%s is already defined in the %s group." key for-group) (setcdr (cdr things) (cons args (cddr things)))) (setcdr things (list args)))
(let* ((options (magit-key-mode-options-for-group for-group)) (things (assoc thing options)) (key (car args))) (if (cdr things) (if (magit-key-mode-key-defined-p for-group key) (error "%s is already defined in the %s group." key for-group) (setcdr (cdr things) (cons args (cddr things)))) (setcdr things (list args))) (setq magit-key-mode-keymaps nil) things)
magit-key-mode-update-group(gitflow-release-finish arguments "=u" "Signing key" "--signingkey=" read-file-name)
magit-key-mode-insert-argument(gitflow-release-finish "=u" "Signing key" "--signingkey=" read-file-name)
apply(magit-key-mode-insert-argument gitflow-release-finish ("=u" "Signing key" "--signingkey=" read-file-name))
#[385 "\300\301��#\207" [apply magit-key-mode-insert-argument] 6 "\n\n(fn &rest ARGS)"](gitflow-release-finish "=u" "Signing key" "--signingkey=" read-file-name)
byte-code("\300\301\302\303\304\305\306\307��!\310"\311\312%\313�!\210��\314\315\316$\210��\317\320\321$\210��\322\323\324$\210��\325\326\327$\210��\330\331\332$\210��\333\334\335$\210��\336\337\340$\210\341�!\266�\342\343\344\303\304\305\306\307��!\345"\311\312%\313�!\210��\330\346\347$\210��\350\351\352$\210\341�!\266�\353\354\355\303\304\305\306\307��!\356"\311\312%\313�!\210��\317\357\360$\210��\350\351\352$\210��\361\362\363$\210��\364\365\366$\210��\367\370\371$\210��\372\373\374$\210��\375\376\377$\210��\201@
any help would be appreciated!
Finishing a feature branch with --squash
does not work. The end state has develop branch checked out but the feature branch commits have not been merged, they've been only staged or something like that.
I'm using Spacemacs, so the key bindings might be different than in normal Emacs. Anyway, here are the steps to reproduce:
$ mkdir tmp
$ cd tmp
$ git init
$ git flow init
$ emacs
SPC g s
% f s featurebranch
SPC f f foobar
SPC f s
SPC g s
% f f -s f
Emacs seems like it hangs, but you can press CTRL g. The feature branch finishing is in some weird non-finished state.
magit-version: Magit 29160815.1946, Git 2.9.3, Emacs 24.5.2, gnu/linux
It is very similar to the feature command, but uses a different prefix.
Both the completion doesn't offer any choices, and the minibuffer doesn't accept a manually-typed branch name.
As a result, there is no clear indication that anything is wrong if a feature branch creation fails (except that the branch remains the same in the magit status buffer)
The minibuffer just shows:
(No buffers need to be reverted)
after the operation has failed.
This may be a fundamental design problem in... something, I'm not sure what. I have a feeling that the combination of emacs minibuffer + async + async error reporting = really bad idea, for exactly this kind of reason.
This looks way to cool to let it linger on github. Why no package it so people could install this directly via emacs package manager? This would tremendously increase user base, testing etc.
Hi. Just started to use your package. :) I noticed that the option to skip the tag is --notag
, but --tag
is used in your code. So the -n switch is not working as it should.
Greetings for the useful package!
I'm just starting using git flow - -thanks for this plugin, it seems great!
I am not sure if I quite understand the flow, but I'd really like to push master directly to upstream when I finish a release. I see there's a switch -p
but I'd really like to have this done by default. I tried adding
(magit-define-popup-switch 'magit-gitflow-release-finish-popup ?p "Push after finish" "--push" t)
but that doesn't seem to activate the switch. Can you give any guidance? thank you!
If I add the following to my init.el
:
(add-hook 'magit-mode-hook
(lambda ()
(require 'magit-gitflow)
(when (fboundp 'turn-on-magit-gitflow)
(turn-on-magit-gitflow))))
...I get this when starting magit:
byte-code: Symbol's function definition is void: magit-key-mode-add-group
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.