diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-09-15 00:31:08 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-09-15 00:31:14 -0400 |
commit | f2288fe8d519eab3fc6461f96ed03eee1cf2eb73 (patch) | |
tree | c8c6debccf34e305b9c9cbee84815dc71a4a408c | |
parent | 9a5adfd37e66e1e6fdb3473c21d4b7c86aeaed3c (diff) | |
download | emacs.d-f2288fe8d519eab3fc6461f96ed03eee1cf2eb73.tar.gz |
magit-commit-{wip,extend}-with-file: allow untracked
-rw-r--r-- | lisp/init-git.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el index 0b13be2..a5fb2c9 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -74,7 +74,8 @@ CHOOSE-PROJECT is non-nil, prompt for the project name." (user-error "No current file")))) (cond ((magit-anything-staged-p) (user-error "There are already staged changes")) - ((member file (magit-modified-files)) + ((member file (nconc (magit-untracked-files) + (magit-modified-files))) (magit-with-toplevel (magit-stage-file file)) (magit-commit-extend)) (t @@ -89,7 +90,8 @@ branch." (user-error "No current file")))) (cond ((magit-anything-staged-p) (user-error "There are already staged changes")) - ((member file (magit-modified-files)) + ((member file (nconc (magit-untracked-files) + (magit-modified-files))) (magit-with-toplevel (magit-stage-file file)) (magit-run-git "commit" (concat "--message=WIP " file))) (t |