Re: [PATCH v2] short status: improve reporting for submodule changes
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Mar 16, 2017, 22:53 UTC
- Message-ID
- <20170316225307.GC9135@aiede.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kagA38GjXcRp1XBXhjR6OLgk-zrVC5MC2eo+nZziBETLg@mail.gmail.com>
Stefan Beller wrote:
> Jonathan Nieder wrote:
Show 6 quoted lines
>> Is it important to avoid clutter by showing the submodule only once? >> What would you think of showing whatever subset of those three >> statuses apply to a given submodule as separate lines instead, to >> match the information that long-form "git status" shows? > > I considered it, but it would break the visual appeal of git status --short ?
I could go either way. As long as you've thought about it, I'm happy.
Show 12 quoted lines
>> How should a new untracked file in a submodule of a submodule be >> shown? > > The same way " ?" indicates that (1) there is an untracked file due to > the question mark and (2) that you need to recurse because it differs from > "??" for regular untracked files. > > The problem here is that we do not know about these nested untracked files, > because we use --porcelain instead of --short for submodules in > submodule.c#is_submodule_modified(). I am rewriting that function anyway > for the "git-describe --dirty" bug, so maybe it's time to switch to porcelain=2 > internally there, which can surface untracked files in nested subs.
Punting to a TODO / separate patch sounds reasonable. Tests in this patch describing either the current behavior or the desired behavior would be helpful, though.
Thanks, Jonathan