must_commit_first needs to check the index, not just the working dir
commit071830ffca8ed99d8f24c6f6931b4f14dfe89f8e
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Fri, 12 Sep 2008 15:49:36 +0000 (12 11:49 -0400)
committerJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Fri, 12 Sep 2008 15:49:36 +0000 (12 11:49 -0400)
treef57953ab85243b1940774925307e7987cfa28fea
parent40fbce5ac8c6468f6089086c9eb6a03072f19540
must_commit_first needs to check the index, not just the working dir

This fixes a bug, where a number of commands (i.e., new) ignored the
uncommitted changes:

$ echo abc >> def
$ git update-index def
$ guilt new foo # creates a new empty patch, instead of aborting

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
guilt