nonsequitur / git-gutter-plus

147 stars 18 forks source link

injects git warnings into commit messages #26

Closed ensc closed 9 years ago

ensc commented 9 years ago

When git prints non-criticial warnings or error messages, these are injected into commit messages.

E.g.

# prepare git repository
mkdir /tmp/XXX
cd /tmp/XXX
git init

# cause a warning
echo /non-existing > .git/objects/info/alternates

# do some work
echo foo > test
git add test
git commit -m 'initial checkin' test

Now, open the /tmp/XXX/test file in emacs, change it, do git-gutter+-stage-hunks and git-gutter+-commit.

The resulting commit message will contain the

error: object directory /non-existing does not exist; check .git/objects/info/alternates.

warning which is sometimes added to the code too.

nonsequitur commented 9 years ago

Fixed. Thanks for the report! :cop: