Web lists-archives.com

Re: [RFC PATCH] short status: improve reporting for submodule changes




Stefan Beller <sbeller@xxxxxxxxxx> writes:

> While we already have a porcelain2 layer for git-status, that is accurate
> for submodules, users still like the way they are are used to of
> 'status -s'.
>
> As a submodule has more state than a file potentially, we'll look at all
> cases:
>
>    ------ new submodule commits
>  /  ----- modified files
>  | /   -- untracked files
>  | |  /
>  | | |   current / proposed reporting
>  0 0 0     "  "     "  "
>  0 0 1     " M"     " ?"
>  0 1 0     " M"     " m"
>  0 1 1     " M"     " m"
>  1 0 0     " M"     " M"
>  1 0 1     " M"     " M"
>  1 1 0     " M"     " M"
>  1 1 1     " M"     " M"

You are essentialy saying that there are three levels, 1. with
commit level difference, 2. the same commit with local mods, 3. no
mods but with crufts, and instead of wasting 8 letters to express
all combinations, the highest level is reported, right?  That sounds
OK to me.  I am not sure if "?" is a good letter to use (doesn't it
usually mean it is an untracked cruft?), though.

Does the commit level difference really mean "has new commits"?  It
probably is not new problem but an old mistake inherited from the
current code, but I suspect that you're just comparing the commit
bound in the index of the superproject and the HEAD commit in the
submodule, in which case "newness" does not matter a bit---"is it
the same or different?" is the question you are asking, I would
think.