git diff-files can be confused if the index is not up to date, so make sure it is updated first. Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx> --- guilt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/guilt b/guilt index 50414a4..cdf4e9b 100755 --- a/guilt +++ b/guilt @@ -495,6 +495,7 @@ s/^\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\) \([0-9]\{2\}\):\([0-9]\{2\}\):\( # usage: must_commit_first must_commit_first() { + git update-index --refresh --unmerged -q > /dev/null [ `git diff-files | wc -l` -eq 0 ] return $? } -- 1.5.6.1.205.ge2c7.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html