Don't commit if not inside a Git work tree
Prevents committing files inside `.git`, such as the `.git/rebase-merge/git-rebase-todo`.
This commit is contained in:
parent
309c610e39
commit
848374379a
1 changed files with 5 additions and 1 deletions
|
@ -341,7 +341,11 @@ should already have been set up."
|
|||
(when (and (buffer-live-p buffer)
|
||||
(or (and gac-automatically-add-new-files-p
|
||||
(not (gac--buffer-is-tracked buffer)))
|
||||
(gac--buffer-has-changes buffer)))
|
||||
(gac--buffer-has-changes buffer))
|
||||
(string=
|
||||
"true\n"
|
||||
(gac--shell-command-to-string-throw
|
||||
"git rev-parse --is-inside-work-tree")))
|
||||
(gac-commit buffer)
|
||||
(gac-merge buffer)
|
||||
(with-current-buffer buffer
|
||||
|
|
Loading…
Add table
Reference in a new issue