From a9fcb7d78b9620257cb7f81fba2ffd23fb9f951e Mon Sep 17 00:00:00 2001 From: Leah Date: Wed, 1 Sep 2021 12:59:25 -0400 Subject: [PATCH] List deleted submodules in 'Changes not staged for commit' --- node/lib/util/diff_util.js | 5 +---- node/lib/util/print_status_util.js | 5 +---- node/lib/util/status_util.js | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/node/lib/util/diff_util.js b/node/lib/util/diff_util.js index 3674e98b0..cfde6854e 100644 --- a/node/lib/util/diff_util.js +++ b/node/lib/util/diff_util.js @@ -94,10 +94,7 @@ function readDiff(diff) { continue; } - // Skip the all submodule changes; they're handled separately. - if (NodeGit.TreeEntry.FILEMODE.COMMIT !== file.mode()) { - result[path] = fileStatus; - } + result[path] = fileStatus; } return result; } diff --git a/node/lib/util/print_status_util.js b/node/lib/util/print_status_util.js index 157583ebb..11ce0adcb 100644 --- a/node/lib/util/print_status_util.js +++ b/node/lib/util/print_status_util.js @@ -220,9 +220,7 @@ exports.listSubmoduleDescriptors = function (status) { // If it's been removed, there's nothing more to add. if (null === index) { - staged.push(new StatusDescriptor(FILESTATUS.REMOVED, - subName, - "submodule")); + // Should have a "removed" status from parent repo return; // RETURN } @@ -232,7 +230,6 @@ exports.listSubmoduleDescriptors = function (status) { let stagedStatus = FILESTATUS.MODIFIED; // other choice is `ADDED` if (sub.isNew()) { - stagedDetail += ", newly created"; stagedStatus = FILESTATUS.ADDED; } diff --git a/node/lib/util/status_util.js b/node/lib/util/status_util.js index 9d9075666..276201272 100644 --- a/node/lib/util/status_util.js +++ b/node/lib/util/status_util.js @@ -519,7 +519,7 @@ exports.getRepoStatus = co.wrap(function *(repo, options) { assert.isArray(options.paths); } if (undefined === options.showMetaChanges) { - options.showMetaChanges = false; + options.showMetaChanges = true; } else { assert.isBoolean(options.showMetaChanges);