git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Show submodules as modified when they contain a dirty work tree

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jan 14, 2010, 08:32 UTC
Message-ID
<4B4ED68D.1060402@web.de>
In-Reply-To
<7v6375lkpj.fsf@alter.siamese.dyndns.org>
Am 13.01.2010 23:10, schrieb Junio C Hamano:
> Jens Lehmann <Jens.Lehmann@web.de> writes:
> I had to squash in '#include "submodule.h"' in diff-lib.c just after it
> includes "refs.h", though.
Sorry, i seem to repeatedly have missed the compiler warning :-(
Show 15 quoted lines
> And a patch to add:
> 
>>> * It doesn't give detailed output when doing a "git diff* -p" with or
>>>   without the --submodule option. It should show something like
>>>
>>>     diff --git a/sub b/sub
>>>     index 5431f52..3f35670 160000
>>>     --- a/sub
>>>     +++ b/sub
>>>     @@ -1 +1 @@
>>>     -Subproject commit 5431f529197f3831cdfbba1354a819a79f948f6f
>>>     +Subproject commit 3f356705649b5d566d97ff843cf193359229a453-dirty
>>>
> 
> would look like the attached.
Thanks!
Show 20 quoted lines
> I think a reasonable next step would be
> 
>  - Move the check for your condition (c) that we dropped from this round
>    to wt-status.c;
> 
>  - Add wt_status_print_dangling_submodules() to wt-status.c, and use the
>    above logic to produce a section "Submodules with Dangling HEAD" or
>    something.
> 
>  - Call it in wt_status_print(), immediately before we check s->verbose
>    and show the patch text under -v option.  "git status" now will warn
>    about the condition (c).
> 
>  - Add a similar wt_shortstatus_print_dangling_submodules() and call it at
>    the end of wt_shortstatus_print().
> 
>  - Update is_submodule_modified() in your patch thats reads the output
>    from "status --porcelain", to *ignore* information about dangling
>    submodules.  As we discussed, dangling submodules may be something the
>    user cares about, but that is not something "diff" should.
Great, i will send patches when i have something to show.
Previous: Junio C HamanoNext: Jens Lehmann
Message 7 of 14 in “Show a dirty working tree and a detached HEAD in status for submodule”
  1. Show a dirty working tree and a detached HEAD in status for submoduleJens Lehmann, Jan 11, 2010
  2. Junio C HamanoJan 11, 2010
  3. Jens LehmannJan 12, 2010
  4. Junio C HamanoJan 13, 2010
  5. Show submodules as modified when they contain a dirty work treeJens Lehmann, Jan 13, 2010
  6. Junio C HamanoJan 13, 2010
  7. Jens LehmannJan 14, 2010
  8. Jens LehmannJan 14, 2010
  9. Junio C HamanoJan 14, 2010
  10. Jens LehmannJan 15, 2010
  11. Performance optimization for detection of modified submodulesJens Lehmann, Jan 17, 2010
  12. Junio C HamanoJan 17, 2010
  13. Jens LehmannJan 17, 2010
  14. Nanako ShiraishiJan 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.