capnfabs / grouse

A diff tool for Hugo static sites.
https://capnfabs.net/posts/grouse-diff-tool-hugo-static-site-generators/
MIT License
13 stars 2 forks source link

Diff results don't include deletions #4

Closed capnfabs closed 4 years ago

capnfabs commented 4 years ago

The git diff command being run by grouse produces results that are different from what I would have expected when files are present in first output but not in second output.

Grouse runs git diff --stat f8f5721544d2442b761763b0ee19c074513076f0 4d84acb03641af028a777c7d86a76b5ab1770b86, which produces:

 index.html        |   1 -
 posts/index.html  |   1 +
 posts/index.xml   | 415 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sitemap.xml       |  14 ++-
 xpub/rc/index.xml | 101 +++++++++++++++++++
 5 files changed, 527 insertions(+), 5 deletions(-)

whereas running git diff --stat f8f5721544d2442b761763b0ee19c074513076f0 (i.e. without the later commit) produces:

 categories/index.html       | 104 ---------------
 index.html                  |   1 -
 index.xml                   | 459 -----------------------------------------------------------------
 posts/index.html            |   1 +
 feed.xml => posts/index.xml |  85 +++---------
 sitemap.xml                 |  14 +-
 xpub/rc/index.xml           | 101 +++++++++++++++
 7 files changed, 132 insertions(+), 633 deletions(-)

The second result is what I would have expected here.

capnfabs commented 4 years ago
Screen Shot 2020-01-06 at 3 49 44 pm

Oh, I figured it out -- deletions aren't getting added. Yikes.