diff options
Diffstat (limited to 'lisp')
-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 |