Project.pm: tighten up is_empty check
commitba8d9e23a8d284675b4613204d686a9c76dc5189
authorKyle J. McKay <mackyle@gmail.com>
Wed, 18 Aug 2021 18:26:28 +0000 (18 11:26 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 18 Aug 2021 18:26:28 +0000 (18 11:26 -0700)
tree34e57f00ef19070d52c834457a36bbe3e9559226
parentf1281597af1c640d1dd7c1c11e4c900323c68fa6
Project.pm: tighten up is_empty check

The "kludge" to accomodate $Girocco::Config::empty_commit_message
can leave non-empty projects undetectable.

Refuse to consider them "empty" if they have more than two loose
objects (create-initial-empty-commit makes exactly two loose objects).

While still not perfect, the check for the new conditions remains
relatively fast (no external processes needed) and will correctly
return a false "is_empty" status now for "empty" projects that have
been modified outside Girocco.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
fixup! Project.pm: tighten up is_empty check
Girocco/Project.pm