On Wed, Aug 17, 2016 at 5:51 PM, Jacob Keller <jacob.e.keller@xxxxxxxxx> wrote: > From: Jacob Keller <jacob.keller@xxxxxxxxx> > > The submodule log diff output incorrectly states that the submodule is > "not checked out" in cases where it wants to say the submodule is "not > initialized". Change the wording to reflect the actual check being > performed. > > Signed-off-by: Jacob Keller <jacob.keller@xxxxxxxxx> > --- > submodule.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/submodule.c b/submodule.c > index 1b5cdfb7e784..e1a51b7506ff 100644 > --- a/submodule.c > +++ b/submodule.c > @@ -348,7 +348,7 @@ void show_submodule_summary(FILE *f, const char *path, > if (is_null_sha1(two)) > message = "(submodule deleted)"; > else if (add_submodule_odb(path)) > - message = "(not checked out)"; > + message = "(not initialized)"; I think "not checked" out is actually correct here. $ git clone https://gerrit.googlesource.com/gerrit $ cd gerrit $ git submodule update --init ... $ git diff cc82b24..5222e66 plugins/ Submodule plugins/cookbook-plugin 2d40ee2..69b8f9f: > Organize imports $ rm -rf plugins/cookbook-plugin/ $ git diff cc82b24..5222e66 plugins/ Submodule plugins/cookbook-plugin 2d40ee2...69b8f9f (not checked out) $ Mind that by "rm -rf" of the working dir I create the "not checked out, but initialized state and even cloned state". So as a long term TODO: I guess we could teach `add_submodule_odb` to operate inside its git directory instead of its working directory, to have it working whenever we have the object database (no matter if checked out or not). Although this may collide with the plan of a different refs backend? I dunno. add_submodule_odb is used in a variety of places: show_submodule_header submodule_needs_pushing push_submodule is_submodule_commit_present merge_submodule And all of them seem to not require a checkout, but the presence of objects is fine. -- 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