changes in v6: * The function get_submodule_displaypath() was modified for the case when get_super_prefix() returns a non-null value. The condition to check if the super-prefix ends with a '/' is removed. To accomodate this change appropriate value of super_prefix is passed instead in the recursive calls of init_submodule() and status_submodule(). * To accomodate the possiblity of a direct call to the function init_submodule(), a callback function init_submodule_cb() is introduced which takes cache_entry and init_cb structures as input params, and calls init_submodule() with parameters which are more appropriate for a direct call of this function. * Similar changes were even done for status_submodule(). But as it was observed that the number of params increased a lot due to flags like quiet, recursive, cached, etc, and keeping in mind the future subcommand's ported functions as well, a single unsigned int called cb_flags was introduced to store all of these flags, instead of having parameter for each one. * Patches [3/4] and [4/4] from the previous series were merged as a single step. * Call to function cmd_diff_files was avoided in the function status_submodule() and instead used the function run_diff_files() for the same purpose. Since there were many changes the patches required, I took more time on making these changes. Thank you, Junio for the last reviews. They helped a lot for improving the patch series. As before you can find this series at: https://github.com/pratham-pc/git/commits/patch-series-1 And its build report is available at: https://travis-ci.org/pratham-pc/git/builds/ Branch: patch-series-1 Build #184 Prathamesh Chavan (3): submodule--helper: introduce get_submodule_displaypath() submodule--helper: introduce for_each_listed_submodule() submodule: port submodule subcommand 'status' from shell to C builtin/submodule--helper.c | 281 +++++++++++++++++++++++++++++++++++++++++--- git-submodule.sh | 61 +--------- 2 files changed, 265 insertions(+), 77 deletions(-) -- 2.13.0